Improve the error message for missing else clauses in if expressions

Closes #4201.