Fix build warning and a proper handling of failed lookups using NPCManager::getID()