Added error checking when checking the tableau state.