code: public void validate(Object value) throws InvalidPropertyValueException {
          if (value != null && !this.type.isInstance(value)) {
              throw new InvalidPropertyValueException("wrong type: expected " + this.type.getCls() + " but was " + value.getClass());
          }
          if (this.validator != null) {
              this.validator.validate(this.name, value);
          }
      }
docs: Checks if the value null but required, then checks if the value has the
  right type, then calls the specified validator's
  {@link BackendPropertyValidator#validate(java.lang.String, java.lang.Object) } method.
  @param value a value.
  @throws InvalidPropertyValueException