Remove unnecessary if...else