The static compiler does not allow the assignment of literal null to a variable of type boolean. The compiler complains with this message: "Cannot assign value of type java.lang.Object to variable of type boolean"
I consider this message being misleading since it is very well allowed to assign a value of type Object to a boolean,because it will be transformed using Groovy truth. According to that null will be transformed to false.
So either the message should be improved or the check removed for the boolean case