Fix a bug with correctly returning strings that may contain nulls