XWIKI-8837: Date property generates a NPE when not defined and $doc.display() is used
* Better fix (thanks to Denis)