remove redundant `if` condition