An implementation of a UnionType