title: LinkedList AttributeError: 'NoneType' object has no attribute 'data'
body: <p>I'm working on the Codewars Kata on linkedLists, and keep getting the error AttributeError: 'NoneType' object has no attribute 'data'</p>
  
  <pre><code>class Node(object):
      def __init__(self, data):
          self.data = data
          self.next = None`
  
  def push(head, data):
      if data == None: return
      new_node = Node(data)
      new_node.next = head
      head = new_node
  
  def build_one_two_three():
      head = None
      push(head, 3)
      push(head, 2)
      push(head, 1)
      return head
  </code></pre>
  
  <p>I thought using the <code>if data == None</code> would fix the problem but it didn't. Any suggestions would be greatly appreciated.</p>