With a predicate that identifies a range of positions,
for example $x[position() le $end], a
NullPointerException occurs if the expression
identifying the start or end point of the selected
range ($end in this example) evaluates to an empty
sequence.