Doc for xpath to find first element.
Check reference object before applying logic.