Scripts/TheStormPeaks: Possible crash fix

Apply safe NULL checks added in 7d881a073961887d446d4430905f315b52928bb1 to similar code in same script