Simplify `checkMatch` (untested).