Don't crash if str is null

Is useful especially when we want to create a string from another message string that might be null.
1 file changed