Use dyn_cast<> instead of isa<> and cast<>