Encode null values to empty strings