title: Check if a given key already exists in a dictionary and increment it
body: <p>How do I find out if a key in a dictionary has already been set to a non-None value?</p>
  <p>I want to increment the value if there's already one there, or set it to 1 otherwise:</p>
  <pre><code>my_dict = {}
  
  if my_dict[key] is not None:
    my_dict[key] = 1
  else:
    my_dict[key] += 1
  </code></pre>