It does too, so long as you do it in a separate push and don't accidentally put the if inside the ); at the end of the first push.

Another approach is to push () instead of "" when you are trying to push nothing.