Any particular reason to not use `isinstance`.