GPII-668: Fixing the issue of the server crashing by checking for existing object

Quick fix for GPII-668. When looking into this issue, we realized that the ontology server implementation was completely broke. After a longer discussion, we decided on the following plan of action: http://issues.gpii.net/browse/GPII-672