add null-pointer check on return of getPageList