--- /QCodec.java	2023-07-05 02:20:16.670123125 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/QCodec.java	2023-07-05 02:20:16.674123124 +0200
@@ -247,7 +247,7 @@
     public Object encode(Object pObject) throws EncoderException {
         if (pObject == null) {
             return null;
-        } else if (pObject instanceof String) {
+} else if  ( "Objects of type " + pObject.getClass (  ) .getName (  ) )  {
             return encode((String) pObject);
         } else {
             throw new EncoderException("Objects of type " + 
