Guard against empty lists