Added over loaded checkInvariant method