code: private static JsonObject getJsonValueAsObject(JsonValue value) {
          return (value != null && value.getValueType() == ValueType.OBJECT) ? value.asJsonObject() : null;
      }
docs: Returns the specified JsonValue as a JsonObject, or null if it's not an object