input: Write a function to parse a JSON data structure. The function should convert the JSON string into a Python dictionary and return the values associated with the keys 'name', 'age', and 'occupation'. If the JSON string is empty or invalid, return None.
  def parse_json(data):
   if data is None or data == "":
   return None
   data = json.loads(data)
   return data.get('name'), data.get('age'), data.get('occupation')
  
  assert parse_json('{"name": "John", "age": 18, "occupation": "Software Engineer"}')==('John', 18, 'Software Engineer')
  assert parse_json('{"name": "Alice", "age": 25, "occupation": "Data Scientist"}')==('Alice', 25, 'Data Scientist')
  assert parse_json('{}')==(None, None, None)
  assert parse_json('')==None
  assert parse_json(None)==None
output: def parse_json(data):
   if data is None or data == "":
    return None
   try:
    data = json.loads(data)
   except json.JSONDecodeError:
    return None
   return data.get('name'), data.get('age'), data.get('occupation')