According to http://groovy.codehaus.org/Things+you+can+do+but+better+leave+undone
Accessing an object\'s type like a property
Because when a is a map, a.class is the same in Groovy as a.get( "class" ). As you can see in the example in the docs, this will return null. That's why the rule trends to be to use getClass unless you're absolutely sure the variable won't be a map
a
a.class
a.get( "class" )