[fix] Added guard to loading PDF viewer