Fix parenthesized conditions in if-else assignment

This addresses at least #3309 and #3738 and has to do with parenthesized existential operator. After turning it back and forth several times, I couldn't find anything more elegant than this. I'm not sure if it requires something more fundamental to make the check with some more beauty. Additionally, in what case it could possibly generate extra parentheses now?