`def ? true : false` would work as well. Not sure which one is better though.