[refactor] A bit less hackish version
XWIKI-10040: XAR export is failing if one of the document properties has a null value