Fix error when objects have no location

Once the Tannhauser and Kandinsky exhibitions were imported, the api
server started crashing on many objects because those objects were
linked to the exhibition but their location in the exhibition was null.
This led to an object's as_resource method trying to call as_resource on
nil, which of course doesn't exist.

Check if an object's location is nil output nil instead of a resource.