Add validation in Node::setText().