code: boolean canCastToType( Value value ) {
          try {
              assert value instanceof JcrValue : "Illegal implementation of Value interface";
              ((JcrValue)value).asType(getRequiredType()); // throws ValueFormatException if there's a problem
              return true;
          } catch (javax.jcr.ValueFormatException vfe) {
              // Cast failed
              return false;
          }
      }
docs: Returns <code>true</code> if <code>value</code> can be cast to <code>property.getRequiredType()</code> per the type
  conversion rules in section 3.6.4 of the JCR 2.0 specification. If the property definition has a required type of
  {@link PropertyType#UNDEFINED}, the cast will be considered to have succeeded.
  
  @param value the value to be validated
  @return <code>true</code> if the value can be cast to the required type for the property definition (if it exists).