handle nil slices