Null aware function invocation operator

Using the call method, you can achieve what you want with:

nullableFunctionInstance?.call(blah)

There’s also the apply method if you want to pass arguments.

Leave a Comment