Same situation here - it may be easier to check the reverse case (`isinstance bool`)