Handle the case of an empty string. Fixes #13401.

Adds a `value === ""` check  to `.replaceWith()`.