tinkerpop/gremlin — pull request #309 by michail-nikolaev (2012-09-09 12:30:32+00:00)
Title: Explicit NPE throwing

In case of

graph.getVertex(keyword1.getId() == null

new GremlinPipeline(graph.getVertex(keyword1.getId()))
.out("IS_IN")
.dedup().in("IS_IN")
.has("keyword", keyword2.getKeyword()).count();

will throw NPE too deeply inside pipes...

I have spend about an hour to manage such simple error.
So, I think it is better to throw NPE explicit .