if (this.getExecutionCourse().isMasterDegreeOnly()) {
if (this.getExecutionCourse() != null && this.getExecutionCourse().isMasterDegreeOnly()) {
    private void notifyTeacher() {        if (this.getExecutionCourse().isMasterDegreeOnly()) {            ITeacher teacher = this.getTeacher();            teacher.notifyCreditsChange(CreditsEvent.MASTER_DEGREE_LESSONS, this);        }    }