Added exception to checkRep() if either m1 or m2 is null