REVIEW: NEXUS-6495 gaurd npe error page rendering

https://issues.sonatype.org/browse/NEXUS-6495