probably comparing the type directly would be more efficient and bullet proof:

```
 from .dialect import CrateDialect

 ...
 is_crate = type(conn.dialect) is CrateDialect

```