If-else-then control sequences should start with
\if
(or variants) and should end with
\fi
.