Added nullcheck in baseObject
1. In case the baseObject was created without a collection, upon deleting
it will not try to remove itself from the parent collection.