title: Python TypeError: object of type 'NoneType' has no len()
body: <p>I am getting an error from this code:</p>
  <pre><code>def make_int(var):
      if len(var) != 0:
          var = int(var)
      return var
  </code></pre>
  <p>error:</p>
  <p><code>TypeError: object of type 'NoneType' has no len()</code></p>
  <p>How do i fix this?</p>