Handle empty Differences by removeDifference

Handle the empty Differences structure when using removeDifference

Relates to #302
Add null protections to XmlUtil

Relates to #294, #302