code: function check(msg) {
          if (!_required && (_valueType === 'undefined' || _value === null)) {
              // The value is optional and was not specified, so skip check
              return;
          }
  
          if (typeof _typeValid === 'undefined' && _valueType !== 'undefined' && _value !== null) {
              // No type was specified and no type was requested for the contract, so don't enforce a type.
              _typeValid = true;
          }
  
          if (!_typeValid) {
              throw new TypeError(msg);
          }
  
          if (!_valid) {
              // TODO: Possibly maintain errors along the checking path and report them.
              throw new Error(msg);
          }
      }
docs: /*
  Validation checks