#dijkstra throws error if root/target element doesn't exist #550