check length of if expressions