Added entity_id validation to the State class