fix NPE in getPageTypeRefForDocWithDefault