Check for the empty string before creating a new text node when setting document.title