docs: public void maybeSetMapType() {
      if (type == Type.UNKNOWN) {
        type = Type.MAP;
      } else if (type == Type.LEGACY_OBJECT_MAP_OR_RECORD) {
        throw new IllegalStateException(
            "Expected a value of type `map`, got `legacy_object_map`. "
                + "These two map types are not interoperable. "
                + "Use `legacyObjectMapToMap()` to convert this object to a map.");
      }
    }