Add checks for Set's foreach, map, and partition.