[NEXUS-6495] guard against NPE when rendering error page template