How do you know that there is no way?

I use Google translator. So sorry for bad english.
At the site Seeker and AIFollow. Assigned to the final point. It is in a closed room. How do I know that it is not the way? The object of beating the nearest point to the final point and everything.
It is necessary to determine whether there is let to the final point, and, if not, then switch to another target.

Hi

You can for example use IsPathPossible [1]

[1] http://arongranberg.com/astar/docs/class_pathfinding_1_1_path_utilities.php#a25736e29fdb41bc3f1d57abeaf2c8eef