code: public static String sanitizeResponse(String nativeRs) {
          if (StringUtils.isEmpty(nativeRs)) return "";
  
          byte[] utf8Bytes;
          CharsetDecoder cs = StandardCharsets.UTF_8.newDecoder();
  
          if ("null".equalsIgnoreCase(nativeRs)) return "";
          utf8Bytes = nativeRs.getBytes(StandardCharsets.UTF_8);
          try {
              cs.decode(ByteBuffer.wrap(utf8Bytes));
              return new String(utf8Bytes, StandardCharsets.UTF_8);
          } catch (CharacterCodingException e) {
              return "[INVALID NON UTF-8 ENCODING]";
          }
      }
docs: Utility method used to sanitize / canonicalize a String-based response
  artifact from a source system. This will return a valid UTF-8 strings, or
  a "" (blank) response for any of the following cases:
  "NULL";"Null";"null";null;""
  
  @param nativeRs The string response artifact retrieved from the source system
  to be sanitized
  @return A UTF-8 sanitized response