Fix NPE in XPath evaluation

Happened on empty primitive-valued elements, e.g. when evaluating aixm:name/text() on

```xml
   <aixm:name xsi:nil="true"/>
```