Fixed NullPointerException when trying to retrieve a non-existing edge.