docs: private static boolean lenientIsInstance(Class<?> expectedClass, Object value) {
      if (expectedClass.isArray()) {
        Class<?> componentType = expectedClass.getComponentType();
        if (!(value instanceof Object[])) {
          return false;
        }
        for (Object element : (Object[]) value) {
          if (!lenientIsInstance(componentType, element)) return false;
        }
        return true;
      } else if (expectedClass == Class.class) {
        return value instanceof TypeMirror;
      } else {
        return expectedClass == value.getClass();
      }
    }