Check that objectID is not null in deleteObject to avoid deleting the index