Cast to parameterized type the right way.