Check for NULL before assigning to TString (Coverity 53581).