use !empty tests in page.tpl.php to avoid Notices of undefined index