Add further robustness to server-side setNPCState().