title: Constructor element is undefined and returns error
body: <p>Simple problem but I can't figure out the solution. I have a simple character counter on a textbox which works as expected, however, I'm having trouble with the <code>constructor</code> and <code>componentWillReceiveProps</code>. I get an error <code>.length undefined.</code>. How do I get this to work when length is undefined? </p>
  
  <pre><code>constructor(props) {
    super(props);
    const profileCandidateCollection = props.profileCandidate;
    const summary = profileCandidateCollection &amp;&amp; profileCandidateCollection.summary;
    const count = 3000 - (profileCandidateCollection &amp;&amp; profileCandidateCollection.summary.length);
  
    this.state = {
      count: count,
    };
  }
  
  componentWillReceiveProps(nextProps) {
    const profileCandidateCollection = nextProps.profileCandidate;
    const summary = profileCandidateCollection &amp;&amp; profileCandidateCollection.summary;
    const count = 3000 - (profileCandidateCollection &amp;&amp; profileCandidateCollection.summary.length);
  
    this.setState({
      count: count,
    });
  }
  </code></pre>