It seems like my code works to check for null if I do
if ($tx)
or
if (isset($tx))
why would I do the se
Because the first produces a warning, and will also return true if $tx === false, which is not the same as not defined