Simplify a few cast<>s.