Valid parentheses sequence

In reply to Verif Engg:

It’s not strictly necessary as it is already implicit because of the RHS 0 in the conditional expression, but being explicit never hurts and is a good habit to keep.