Get rid of redundant if.