Allow `send` to union of objects

Closes PR 14547
Handle union of different values for functions too

Closes PR 14557