Add a function the bag that compares a string and integer for equality.