avoid trying to create string from null pointer