Replace `isinstance` checks for specific CursorTools with `hasattr`

Perhaps the lesser of two evils here, as suggested by @totycro
Fixes #2051  Pressing Esc in resource overview bar crashes