Adds semantic checks for shortestPath when used to CREATE