Remove unnecessary if/else block