Remove unnecessary if len() statements