Right now we validate some of our proptype definitions, but we don't surface the issue until that component class is consumed. We should instead validate these, in `__DEV__` only as warnings when the class in created. This means that a call to `React.PropTypes.onOf('foo')` results in an immediate warning logged.

This is a relatively contained bit of code so would be a good candidate for somebody looking to start contributing to React.

function checkType(
    isRequired,
    props,
    propName,
    componentName,
    location,
    propFullName
  ) {
    componentName = componentName || ANONYMOUS;
    propFullName = propFullName || propName;
    if (props[propName] == null) {
      var locationName = ReactPropTypeLocationNames[location];
      if (isRequired) {
        return new Error(
          `Required ${locationName} \`${propFullName}\` was not specified in ` +
          `\`${componentName}\`.`
        );
      }
      return null;
    } else {
      return validate(props, propName, componentName, location, propFullName);
    }
  }
  var chainedCheckType = checkType.bind(null, false);
  chainedCheckType.isRequired = checkType.bind(null, true);
  return chainedCheckType;
}
function createPrimitiveTypeChecker(expectedType) {