code: private boolean isPolymorphicType(Class<?> clazz) {
      return polymorphicTypes.stream().anyMatch(polymorphicType -> polymorphicType.getConfigClass() == clazz);
    }
docs: Returns a boolean indicating whether the given class is a polymorphic type.