Check for null nodeValue in nbsp replacement.