dnk if the target position is invalid, get_next_path_position will return the position of the agent's parent. Along with is_navigation_finished, that should be workable. Failing that, if you know more about the environment (e.g. something like a grid/movement allowance/distances), you could plug positions into an AStar object and use something like has_point to determine if a point is reachable.
But I don't know your project - there could be many solutions to the problem you're facing; I feel 'reachable' is a bit fluffy here.