code: public static String trimWhitespaceToNull(final String s) {
          final String result = trimWhitespace(s);
          return StringUtils.isEmpty(result) ? null : s;
      }
docs: Strip leading and trailing whitespace from a String. If the resulting string is empty, this
  method returns null.
  
  @param s
  string to be trimmed
  @return input string with leading and trailing whitespace removed.