Add check_validity() method for Grid.