Remove unnecessary if-block