Groovy gotcha

This stupidly caught me out and a proper D’oh moment followed. I had bad been converting a couple of parameter calls as such:

To something more Groovy (I hate it when people say it like that). But:

I was expecting it to return the boolean value of someBoolean if it wasn’t null, but instead it was tripping the elvis operator and returning the default value when the result was false. Cue slap on the forehead after realising why I wasn’t getting my expected value back.