Added set.union.
Used Array.isArray.