Semantic checking of control flow, if and while.