To identify the pages am using the following code
if($menu->getActive()->id == 203){} // some actions
this line returns error in search page. Search url goes like this
http://localhost/joomla/component/search/?searchword=destination&searchphrase=all&Itemid=103
when the page loads the following error occurs "Trying to get property of non-object".