input: Write a function to calculate the minimum and maximum values in an array. If the given array is empty then return None for both minimum and maximum.
  assert min_max([1, 2, 3, 4, 5])==(1, 5)
  assert min_max([5, 4, 3, 2, 1])==(1, 5)
  assert min_max([10, 10, 10])==(10, 10)
  assert min_max([-1, -2, -3, -4, -5])==(-5, -1)
  assert min_max([])==(None, None)
output: def min_max(arr):
      if not arr:
          return None, None
      return min(arr), max(arr)