default Optional<JsonObject> asJsonObjectOptional() {
        if (this instanceof JsonObject) {
            return Optional.of((JsonObject) this);
        } else if (node() instanceof ObjectNode) {
            return Optional.of(new JsonObject((ObjectNode) node()));
        } else {
            return Optional.empty();
        }
    }
If this is a JSON object, return a JsonObject wrapped by an `Optional`. Otherwise, return Empty.
server-common/src/main/java/org/apache/kafka/server/util/json/JsonValue.java