Simplify isinstance check

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

00:03:29

4.0%
passed pyright #24747

00:00:57

 
  Build
passed linux #24748

00:00:12