fix npe in hasPageTitle in PageType class.