checks for empty lists