If we could, it would be wise to prevent the sun from enveloping the earth at some point before that happened, yes.
(obviously "we" won't be around or whatever, but the point remains: yes, you should solve as many existential threats as you can before they're realized)