final TeacherLegalRegimen legalRegimen = teacher.getCurrentLegalRegimenWithoutEndSitutions(); if (legalRegimen != null) {
if (teacher.getCurrentWorkingDepartment() != null) {
    public ParkingPartyClassification getPartyClassification() {        final Teacher teacher = getTeacher();        if (teacher != null) {            final TeacherLegalRegimen legalRegimen = teacher.getCurrentLegalRegimenWithoutEndSitutions();            if (legalRegimen != null) {                return ParkingPartyClassification.TEACHER;            }        }        final Employee employee = getEmployee();	if (employee != null && employee.getCurrentWorkingContract() != null) {            return ParkingPartyClassification.EMPLOYEE;        }        final GrantOwner grantOwner = getGrantOwner();        if (grantOwner != null && grantOwner.hasCurrentContract()) {            return ParkingPartyClassification.GRANT_OWNER;        }        final Student student = getStudent();        if (student != null) {            final DegreeType degree = student.getMostSignificantDegreeType();            if (degree != null) {                return ParkingPartyClassification.getClassificationByDegreeType(degree);            }        }        return ParkingPartyClassification.PERSON;    }