Fix GRAILS-10745: cope with null classname in cache handling logic