code: private void notifyBefore(FacesContext context, PhaseId phaseId) {
          if (getBeforePhaseListener() != null || phaseListenerIterator != null) {
              notifyPhaseListeners(context, phaseId, true);
          }
      }
docs: null checks.