Use dyn_cast_or_null