Remove redundant if test.