title: 'NoneType' object is not iterable while using itertools.chain.from_iterable
body: <p>I generate a list of list of strings using the following line in spark </p>
  
  <pre><code>l = text.map(lambda x: tokenize(x[0])).collect()
  </code></pre>
  
  <p>Output of l looks like this (subset of a long list):</p>
  
  <pre><code>[['@always_nidhi'], ['@always_nidhi', '@OnlyDancers', '@IcelandNatural'], ['@always_nidhi', '@OnlyDancers', '@IcelandNatural']]
  </code></pre>
  
  <p>It's a list of list of string values. I want a unique set of names and hence my first step is am merging it using the following line. (later I'll use set to get unique values)</p>
  
  <pre><code>list(itertools.chain.from_iterable(l))
  </code></pre>
  
  <p>But I get this error</p>
  
  <p><strong>'NoneType' object is not iterable</strong></p>
  
  <p>Can someone please help.</p>