if (enrolmentEndDay.getTime() != null) {
if (enrolmentEndDay != null) {
    public void setEnrolmentEndDay(Calendar enrolmentEndDay) {        if (enrolmentEndDay.getTime() != null) {            this.setEnrolmentEndDayDate(enrolmentEndDay.getTime());        } else {            this.setEnrolmentEndDayDate(null);        }    }