Remove unnecessary local definition of `asTypeOf`