function getCurrSearchType($st_var,$default = 'commercial'){
$ret_val = $default;
if ($st_var != '') {$ret_val = $st_var;}
return $ret_val
} //end getCurrSearchType
now it's all in how you call it.
//default to commercial
$this->searchType = function getCurrSearchType($_SESSION["searchType"]);
//default to residential
$this->searchType = function getCurrSearchType($_SESSION["searchType"],'residential');
I also made the code self contained. Well behaved functions do not modify globals and if they do it is by modifying a parameter passed by reference.