optimize `if` expressions
more if expression tests