title: React propType cannot read property of undefined
body: <p>Using propTypes to validate props gives the following error:</p>
  <blockquote>
  <p>TypeError: Cannot read property 'string' of undefined.</p>
  <p>TypeError: Cannot read property 'func' of undefined.</p>
  </blockquote>
  <p>The code in question is at the bottom of the snippet:</p>
  <pre><code>import React from 'react';
  import ProjectItem from './ProjectItem';
  
  class Projects extends React.Component {
      
      deleteProject(title) {
        this.props.onDelete(title);
      }
  
      render() { 
        let projectItems;
  
        if (this.props.project) {
          projectItems = this.props.project.map(project =&gt; {
              return (
                  &lt;ProjectItem key={project.title} project={project} onDelete={this.deleteProject.bind(this)}  /&gt;
              )
          });
        }
      
        return (
          &lt;div className=&quot;Projects&quot;&gt;
            {projectItems}
          &lt;/div&gt;    
        );    
      }
  
  }
  
  Projects.propTypes = {
    projects: React.PropTypes.string,
    onDelete: React.PropTypes.func
  }
  </code></pre>