Make null string HTML-safe. Closes #3718.