adding __contains__ to InstanceCollection