I realise that you have to work with what you're given, but a function that returns...

- `None` to indicate an error; or,
- a list of tables...

is really horrible.