Some error checking on adding entities to a state.