Checking whether a set contains an item