If checkMat is only used once there isn't really a reason to assign it a value.  Just do the check in the if statement.  More of a preference, but it makes less code and easier to read code.