If an npc and a pc roll identical initiative how should you determine who goes first?

I specifically play DnD but this question could relate to any combat system that relies on rolling of initiative to determine player and npc order.

Normally when 2 players roll identical initiative in combat they decide between themselves the order they do things in and then stick to that on subsequent rounds.

How should the DM handle it if the NPC rolls the same initiative, especially if they are in combat directly with the player who rolled the identical initiative.

If rolling bulls initiative for a group of NPCs how should identical rolls with players be handled here, it feels like a lot can swing on of the GM chooses for the group of NPCs to attack the player before he can decide his action.