Added a function to check if a position is in the gridworld.