code: public static boolean isValid(@Nullable final String hourRanges) {
          if (hourRanges == null) {
              return true;
          }
          final StringTokenizer tok = new StringTokenizer(hourRanges, "+");
          if (tok.countTokens() == 0) {
              return false;
          }
          while (tok.hasMoreTokens()) {
              final String rangeStr = tok.nextToken();
              if (!HourRange.isValid(rangeStr)) {
                  return false;
              }
          }
          return true;
      }
docs: Verifies if the string is valid and could be converted into an object.
  
  @param hourRanges
  Hour ranges string to test.
  
  @return {@literal true} if the string is a valid string, else {@literal false}.