docs: public static boolean checkValueIsType(Object value, Object name, Class type) {
          if (value != null) {
              if (type.isAssignableFrom(value.getClass())) {
                  return true;
              } else {
                  throw new RuntimeException("The value argument of '" + name + "' must be of type "
                          + type.getName() + ". Found: " + value.getClass());
              }
          } else {
              return false;
          }
      }