1. it is recommended in python to use something like `table.schema is not None` instead of the `!=` operator if you want to check for `None`
2. I think you could just use `table.schema or 'public'` here. It will use `table.schema` if it is not falsy (e.g. `None`)  or fall back to using `'public'`.