It is unnecessary to do a dynamic cast, as the object will always be of the right type.
Besides, we are not adding any checks to assess that the conversion was successful, so there is no real need for the change.