XWIKI-9320: REST objects api wrongly encodes property values
* Bulletproofing against NPE.