code: private static boolean isValidID(String value) {
      try {
        ZoneId.of(value);
      } catch (DateTimeException e) { // ZoneRulesException is subclass of DateTimeException
        return false;
      }
      return true;
    }
docs: https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html#of-java.lang.String-