Add containsItem and toHashSet functions.