Fix toArray(xml) compatibility & logic. Also fix _.find() to return undefined for not found items

Tests included