PropertyIsSingleValuedException, PropertyIsMandatoryException,
IllegalArgumentException {
MyProperty<T> property = (MyProperty<T>) getProperty(d);
if (values.size() > 1 && !d.hasOption(PropertyOption.MULTI_VALUED)) {
throw new PropertyIsSingleValuedException(d);
}
if (values.isEmpty() && d.hasOption(PropertyOption.MANDATORY)) {
// But only if there are no default values.
if (property.getDefaultValues().isEmpty()) {