&& (unit.getType().equals(PartyType.SCIENTIFIC_AREA) || unit.getType().equals( PartyType.SECTION)) && unit.getCostCenterCode() != null) {
&& (unit.getType().equals(PartyTypeEnum.SCIENTIFIC_AREA) || unit.getType().equals( PartyTypeEnum.SECTION)) && unit.getCostCenterCode() != null) {
    private void setAllTopDisplayUnits(Unit unit, Set displayUnits) {        if (unit.getType() != null                && (unit.getType().equals(PartyType.SCIENTIFIC_AREA) || unit.getType().equals(                        PartyType.SECTION)) && unit.getCostCenterCode() != null) {            displayUnits.add(unit);        }        for (Unit displayUnit : unit.getTopUnits()) {            setAllTopDisplayUnits(displayUnit, displayUnits);        }    }