docs: public static <V> void validateConfiguredValueType(Class<V> valueType, V value) throws ClassCastException {
          if (Object.class != valueType) {
              // means that type checks is required
              if (!valueType.isAssignableFrom(value.getClass())) {
                  throw new ClassCastException("Value '" + value + "' is not assignable to " + valueType);
              }
          }
      }