Check if a branch is statically well-formed.
(check-branch branch ctxt) → result
We check that the condition is a boolean. Then we augment the context with the condition and we check the action, whose type is the type of branch.