Use CastInst::castIsValid to simplify the verifier.

Also delete a dead member variable.