// The is_null() function checks whether a variable is NULL or not. This function returns true (1) if the variable is NULL, otherwise it returns false/nothing.
<?php
$var = NULL;
if (is_null($var)) {
echo "yes, is null";
} else {
echo "not null";
}
?>
is_null($foo)
$x = null;
var_dump($x);
is_null($var)
$country = $session?->user?->getAddress()?->country;