input: Write a function that finds the maximum element in a given array. If the array is empty, it should return None.
  assert find_max_element([1, 10, 50, 3, 8])==50
  assert find_max_element([9, 3, 15, 21, 30, 12, 7])==30
  assert find_max_element([-5, -10, -3, -1])==-1
  assert find_max_element([2])==2
  assert find_max_element([])==None
output: def find_max_element(arr):
      if not arr:
          return None
      return max(arr)