boolean (@NotNull Object object, String... classNames) { for (String className : classNames) { Class<?> clazz = findClassForName(className); if (clazz != null && clazz.isInstance(object)) { return true; } } return false; }