GRAILS-11056 - organize type checking extension code