fix textContent for nodes that do not have children

fixes #483
In that case don't use toString, use `String(txt)`