can add:
```
elif not nsx:
   nsx = []
```

and then get rid of the previous [] and None tests.