code: public static String trimToEmpty(final String s) {
          final String trimmed = trim(s);
          if (trimmed == null || trimmed.isEmpty()) {
              return "";
          } else {
              return trimmed;
          }
      }
docs: Removes the whitespace at the beginning and end of a String. When the String only contains
  whitespace, it returns null.
  
  @param s The String to trim, may be null
  @return null when the input String is null or does only contain whitespace, the trimmed
  String otherwise