ccross check for type 'matrix'