Return immediately if there is no path to search in.