Adding check if document date is empty before adding it to the node object.