Hopefully a fixed version of Refactor: introduce isType reducing redundancy.
Coding-by-sed wasn't a good idea :(