A null value when using the each closure is the same as a collection with 0 elements. If you have the code
def test=null
test.each {println "In closure with value "+it}
The print statement won't execute. If you change test to
def test=[1,2,3]
you will get output.