In some situation you confront with some trivial questions. This is one of that kind. How to check weather the page is front page or not. The answer ( perhaps the code ) is very simple.
$menu = & JSite::getMenu();
if($menu->getActive() == $menu->getDefault())