GROOVY-6053: Try iterating or transforming Object into Collection in DefaultGroovyMethods like count(), sort() and other Collection methods. (minor refactor)