diff --git a/src/dassert.m b/src/dassert.m
index 60f88737e70cb557accc59a19aeed985df3ae45e..d3cc80225e5811b9a6c6383436a2190e71db3d47 100644
--- a/src/dassert.m
+++ b/src/dassert.m
@@ -44,14 +44,10 @@ if ~(isequal(nA,nB) && isequal(sA,sB))
     error('dassert:: Dimensions of compared objects A and B don''t match!')
 end
 
-if isequal(cA,cB)
+if ~isequal(cA,cB)
     error('dassert:: Compared objects are not of the same type!')
 end
 
-if iscell(B) && ~iscell(A)
-    error('assert:: Compared objects are not of the same type!')
-end
-
 if isa(cA,'double')
     if use_isequal_matlab_builtin
         t = isequal(A,B);