Pattern matching to find whether a value is not null was done using the is keyword with the respective expected type (included a cast if necessary)
null
is