Safe casting functions

We never did... the "shouldn't pass" section is poorly labelled.