input: Write a function to calculate the sum of squares of all numbers provided in an array of integers. The function should take one parameter, which is the array. If the array is not provided, the function should return 0.
  assert sum_squares([2, 3, 4]) == 29
  assert sum_squares([1, 2, 3]) == 14
  assert sum_squares([0, 0, 0]) == 0
  assert sum_squares([]) == 0
  assert sum_squares([-1, -2, -3]) == 14
output: def sum_squares(arr=None):
      if arr is None:
          return 0
      return sum(x**2 for x in arr)