private static boolean isValidUnicodeScript(@NotNull String category) {
    try {
      return Character.UnicodeScript.forName(category) != null;
    }
    catch (IllegalArgumentException ignore) {
      return false;
    }
  }
private static boolean isValidUnicodeScript(@NotNull String category)