I recently came across this magical operator when digging into Groovy: <=>
Groovy has really made me happy with elvis operators ?. and ?: which I use constantly
You got a list of operators here. It is called the "Spaceship" operator. It handles null without problem.