input: Write a function to determine the most common fruit name from a given list of fruit names. If there is a tie between multiple fruits, return the first one encountered with the highest frequency. The function should handle an empty list by returning None.
  
  def most_common_fruit(fruit_list):
      if not fruit_list:
          return None
      
      freq_dict = {}
      
      for fruit in fruit_list:
          if fruit in freq_dict:
              freq_dict[fruit] += 1
          else:
              freq_dict[fruit] = 1
      
      max_freq = max(freq_dict.values())
      
      for fruit, freq in freq_dict.items():
          if freq == max_freq:
              return fruit
  
  assert most_common_fruit(['Apple', 'Orange', 'Apple', 'Pineapple', 'Grape', 'Apple']) == 'Apple'
  assert most_common_fruit(['Banana', 'Orange', 'Banana', 'Orange', 'Grape']) == 'Banana'
  assert most_common_fruit([]) == None
  assert most_common_fruit(['Apple', 'Apple', 'Banana']) == 'Apple'
  assert most_common_fruit(['Apple', 'Banana', 'Banana', 'Apple']) == 'Banana'
output: def most_common_fruit(fruit_list):
      if not fruit_list:
          return None
      
      freq_dict = {}
      
      for fruit in fruit_list:
          if fruit in freq_dict:
              freq_dict[fruit] += 1
          else:
              freq_dict[fruit] = 1
      
      max_freq = max(freq_dict.values())
      
      for fruit, freq in freq_dict.items():
          if freq == max_freq:
              return fruit