[SOLVED]Openhab 3 timer cancel

The OH 3.3.0 Actions Timers documentation example code uses

myTimer?.cancel()

but most DSL examples use

myTimer.cancel()

What is the correct usage and what is the difference?

Both are correct. The myTimer?.cancel() is a short hand way to write

if(myTimer !== null) myTimer.cancel()

@rlkoshak Thanks