Style fixes.
Fix edge case.

Avoid throwing when the item is not yet in the document (and thus no text
node to update).