Function checkSwitch

Select a checker based on a specified switching value.

If none of the cases match the keys in checkersByCase, the defaultChecker is used, which is alwaysValid by default.