queryObject returns None, getObject raise an exception if an object can't be loaded from an intid. Here even if you use queryObject, you will have an exception Can't adapt None to IUUID.