checking for empty lists