union-1016578: Added union type and unit test

- Rebased changes from last PR