Add sanity check for IF node