Remove unnecessary cast(Class) method

<type>cast() does the job