Maybe raise an exception if xpath is None? Or is this xpath validated before?