well actually it depends on search page is available or not, re-think it like before code that you implemented checking if the class name is defined