Just a comment, no need to change: I was curious and checking an attribute with `hasattr` is an order of magnitude faster than the `try except` block. The later is in the order of micro seconds however.