ECMS-5816: [Unified Search] Failed to display document search result

Problem analysis
* NullPointerException occurs while getting PageState

Fix description
* Return false in the hasPortlet() function when the current page hasn't PageState.