Fix semantics for coalesce operator when target_type is null.

Fixes bug 639482