remove redundant bool check