Parametric versions of doChecked/doUnchecked