Added state validity check