This code for distinguishing "if" from "else" has two problems:
* It is duplicated (here and symmetric intention)
* It is spread among two places: first ``getExpressionType`` returns ``else`` (which actually means "if or else, I don't know yet), and then it is recalculated for if-else case.
Alternative it to pass caret position to ``getExpressionType``, so all these calculations will be there.