code: private static String convertToQuotedString(String s) {
      if (s == null || s.isEmpty()) {
        return null;
      }
      // If already quoted, return as-is
      if (s.charAt(0) == '"' && s.charAt(s.length() - 1) == '"') {
        return s;
      }
      return '\"' + s + '\"';
    }
docs: Encloses the incoming string inside double quotes, if it isn't already quoted.
  @param s the input string
  @return a quoted string, of the form "input".  If the input string is null, it returns null
  as well.