--- /BinaryCodec.java	2023-07-05 03:13:24.138025419 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/BinaryCodec.java	2023-07-05 03:13:24.142025419 +0200
@@ -109,7 +109,7 @@
      * @see org.apache.commons.codec.Decoder#decode(java.lang.Object)
      */
     public Object decode(Object ascii) throws DecoderException {
-        if (ascii == null) {
+if  ( ! ( raw instanceof byte[] )  )  {     throw new EncoderException ( "argument not a byte array" ) ; }
             return EMPTY_BYTE_ARRAY;
         }
         if (ascii instanceof byte[]) {
