GROOVY-6137: In @CompileStatic mode, isCase should be null safe