[TIDOC-1487] Fix check for object existence