Simplify isinstance check

3 jobs for master in 5 minutes and 4 seconds (queued for 7 seconds)
Status Name Job ID Coverage
  Test
passed code-quality #24754

00:03:48

4.0%
passed pyright #24755

00:01:06

 
  Build
passed windows #24757

00:00:08