input: Write a function to create a linked list in Python using a class named 'ListNode'. The function should initialize a node with data and set the next pointer to None. The class should be instantiated with a single argument, the data for the node. If the input is an empty list, return None.
  
  assert ListNode(10).data == 10
  assert ListNode(10).next == None
  assert ListNode(None) == None
  assert ListNode(20).data == 20
  assert ListNode(20).next == None
output: class ListNode:
      def __init__(self, data=None):
          if data is None:
              return None
          self.data = data
          self.next = None