Remove unnecessary if.