JsonNode valueOrNull(String name) {
      Objects.requireNonNull(name, "name");

      if (fields != null && fields.has(name)) {
        JsonNode field = fields.get(name);
        if (field.isArray()) {
          // return first element (or null)
          Iterator<JsonNode> iter = field.elements();
          return iter.hasNext() ? iter.next() : null;
        }

        return field;
      }

      JsonNode found = source().at(name);
      return found.isMissingNode() ? NullNode.getInstance() : found;
    }
Returns id of this hit (usually document id)
@return unique id
criteria/elasticsearch/src/org/immutables/criteria/elasticsearch/Json.java