Make Python interface be compatible with SQL API

Minor changes:

* Allow NULL as the optimizer_params

* Move tolerance to general arguments