Paying attention to this line:
> Also if I use !isset it returns true with a null value for $theme
Well this is clear in the manual:
isset() will return FALSE if testing a variable that has been set to NULL
So !isset($a_Null) = !FALSE = TRUE

From PHP Manual
$var = 0;

if (empty($var)) { // evaluates true
echo '$var is either 0 or not set at all';

if (!isset($var)) { // evaluates false
echo '$var is not set at all';

Read manual: empty() and isset()