title: Why a "'NoneType' is not iterable" error when I am not iterating?
body: <p>When running the following script</p>
  
  <pre><code>dictlist = [
      {'a': 'hello world', 'b': 'my name is Bond'},
      {'a': 'bonjour monde'}
  ]
  
  for d in dictlist:
      if 'Bond' not in d.get('b'):
          print d
  </code></pre>
  
  <p>I expected the output to be empty (the first dict does no match, the second one is missing the key <code>'b'</code>) but I get the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/dev/mytest.py", line 7, in &lt;module&gt;
      if 'Bond' not in d.get('b'):
  TypeError: argument of type 'NoneType' is not iterable
  </code></pre>
  
  <p>I am confused: why is there a <code>argument of type 'NoneType' is not iterable</code> error while I am not iterating (at least on that line)?</p>
  
  <p>I am sure this is an obvious error but the more I look at the code, the less chances that I see it :)</p>