code: public GroovyExpression generateUnaryHasExpression(GroovyExpression parent, String fieldName) {
          return new FunctionCallExpression(TraversalStepType.FILTER, parent, HAS_METHOD, new LiteralExpression(fieldName));
      }
docs: Generates an expression which checks whether the vertices in the query have
  a field with the given name.
  
  @param parent
  @param fieldName
  @return