EZP-22326: [REST API] GET Content request fails when the content has no locations

Fixing the exception by only loading the object's location when it is not null.