```python
def pick_lane(queues: list, closed: list) -> int:
    # Validate inputs
    if not queues or not isinstance(queues, list) or not all(isinstance(q, int) for q in queues):
        raise ValueError("queues must be a non-empty list of non-negative integers")
    if not isinstance(closed, list) or not all(isinstance(c, int) for c in closed):
        raise ValueError("closed must be a list of integers")
    if not all(0 <= q < len(queues) for q in queues):
        raise ValueError("queue indices must be valid")
    if not all(0 <= c < len(queues) for c in closed):
        raise ValueError("closed indices must be valid")
    
        # Check if all lanes are closed
        if all(q in closed for q in range(len(queues))):
            raise ValueError("all lanes are closed")

    # Initialize variables
    best = -1
    min_count = float('inf')

    # Iterate over the lanes
    for lane in range(len(queues)):
        if lane not in closed:
            count = queues[lane]
            if count < min_count or (count == min_count and lane < best):
                min_count = count
                best = lane

    return best
```