introduced Kernel::isScalarMat helper function