you can also drop the conditional and do `assert isinstance(tls_options, (dict, None.__class__))`