period.deleteIfEmpty();
if (period != null) { period.deleteIfEmpty(); }
    public void delete() {        final OccupationPeriod period = getPeriod();        removeLesson();        removeWrittenEvaluation();        removeRoom();        removePeriod();        period.deleteIfEmpty();        super.deleteDomainObject();    }