Fix isinstance for resource in event