Use cast<> instead of dyn_cast<> in places where the type is known.