Add additional check for TextNode for converting to
textValue