check to make sure we have an XML element before asking for its attribute nodes
Merge branch 'bugfix/optional_element_with_embedded_attributes'