What about `tree.isType`?