So I think I'd prefer
```
elif type(domain) is list and len(domain) == 0
```
which has the advantage that it is is an exact check for `[]`. That said, plain old `len(domain) == 0` would probably serve in practice.