ValidationUtils.rejectIfEmpty does not stop the code flow (does not throw error). So even if careSetting is null, code will reach here. So we need a guard clause to guard against NullPointerException.