If an NPC and a PC roll identical initiative who goes first?

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 bulk initiative for a group of NPCs, how should identical rolls with players be handled here? It feels like a lot can swing on whether the GM chooses for the group of NPCs to attack the player before he can decide his action.