ref #10205: test for textValue before calling textValue() on jsonNode