isset() and empty() don't seem to work for arrays unless the array doesn't exist at all.
try something like !empty($array[0][0]); not just empty($array)