Follow up on #802: fix the behavior of the IR checker for While.

Although the constructor of the While(BooleanLiteral(true), body)
always typechecked itself as NothingType, the IR checker still
required that the body typechecked as NothingType. This commit
fixes this inconsistency.