title: Gremlin - only add a vertex if it doesn't exist
body: <p>I have an array of usernames (eg. <code>['abc','def','ghi']</code>) to be added under 'user' label in the graph.</p>
  
  <p>Now I first want to check if the username already exists (<code>g.V().hasLabel('user').has('username','def')</code>) and then add only those for which the username property doesn't match under 'user' label.</p>
  
  <p>Also, can this be done in a single gremlin query or groovy script?</p>
  
  <p>I am using titan graph database, tinkerpop3 and gremlin REST server.</p>