Improve error message in check_if_then

Change-Id: I19f15a3d71d10e47452b5a426f18a0500fb72e19