CSPACE-6273: Avoid string operations on potentially nil value.