Use an empty string to if str was NULL.