Function checkConditionally

Select a checker based on the result of the specified conditional. If the conditional evaluates to true, the then checker is used. Otherwise, the else checker is used.

alwaysValid is the default checker.