fix NPE in PrepareVelocityContextService if getPageTypeRefForCurrentDoc
returns null