IR: Metadata: Remove unnecessary dyn_cast