Use `isinstance()` for all type comparisons