Fix error check with ActivityObject.discover()