Refactor ifAnyEqual, unlessAnyEqual. Added coalesce

1) Refactor ifAnyEqual, unlessAnyEqual. 2) Added coalesce.