Fixed type checking bug. For a CudaNdarray batch, type(batch) is not equal to the string 'CudaNdarray'