Check if NPC id is already in use upon NPC creation.

Includes a tiny if statement fix.