code: public static boolean isInstantiated(final ServletRequest request)
     {
        Assert.notNull(request, "HttpServletRequest argument was null");
        PrettyContext prettyContext = (PrettyContext) request.getAttribute(CONTEXT_REQUEST_KEY);
        if (prettyContext instanceof PrettyContext)
        {
           return true;
        }
        else
        {
           return false;
        }
     }
docs: Return true if there is an instantiated {@link PrettyContext} contained in
  the current given request object.