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