docs: @SuppressWarnings({"ConstantConditions"})
      private Pair<Class<?>, Class<?>[]> getGenericTypePair(Type type) {
          if (ParameterizedType.class.isAssignableFrom(type.getClass())) {
              Class<?>[] optionalValueTypes = null;
  
              @SuppressWarnings({"ConstantConditions"})
              ParameterizedType ptype = (ParameterizedType) type;
  
              if (Map.class.isAssignableFrom((Class<?>) ptype.getRawType())) {
                  optionalValueTypes = new Class<?>[] { (Class<?>) ptype.getActualTypeArguments()[0],
                                                        (Class<?>) ptype.getActualTypeArguments()[1] };
              } else if (Iterable.class.isAssignableFrom((Class<?>) ptype.getRawType())) {
                  optionalValueTypes = new Class<?>[] { (Class<?>) ptype.getActualTypeArguments()[0] };
              }
  
              return new Pair<Class<?>, Class<?>[]>((Class<?>) ptype.getRawType(), optionalValueTypes);
          } else {
              return new Pair<Class<?>, Class<?>[]>((Class<?>) type, new Class<?>[]{});
          }
      }