title: Why does Pylint give error E0702, raising NoneType, on this raise statement?
body: <p>Say I have the following code.</p>
  
  <pre><code>def foo():
      foobar = None
      if foobar is not None:
          raise foobar
  </code></pre>
  
  <p>When I run this code through pylint, I get the following error:</p>
  
  <pre><code>E0702:4:foo: Raising NoneType while only classes, instances or string are allowed
  </code></pre>
  
  <p>Is this a bug in pylint? Is my pylint too old?</p>
  
  <pre><code>pylint 0.18.0, 
  astng 0.19.1, common 0.45.0
  Python 2.5.1 (r251:54863, Aug 25 2008, 09:23:26) 
  </code></pre>
  
  <p>Note: I know this code doesn't make any sense, it's distilled to its bare bones to expose the issue at hand, normally stuff happens in between line 2 and 3 which could make foobar not be None, and no I can't just raise an exception there, because that happens in another thread that has restrictions on it.</p>