a null object reference evaluates to false, a non null reference to true, but for for strings, collections, iterators and enumerations it also takes into account the size.
def m = null
if (!m)
println "empty"
else
println "${m}"
will print "empty"
def m = [:]
if (!m)
println "empty"
else
println "${m}"
The map is not null but empty, this code will print "empty"
After doing
m << ['user' : 'Groot' ]
it will print the Map:
[user:Groot]