Fix build warnings and added error handling for NPCManager::getID()
in GameStatePlay.