input: Write a function to optimize a given multivariate function using scipy.optimize.minimize. The function should take as input the multivariate function and an initial guess, and it should return the optimized values of the variables. If the given function or initial guess is invalid, it should return None.
  assert optimize_function(lambda x: x[0]**2 + x[1]**2, [1, 1])==[0.0, 0.0]
  assert optimize_function(lambda x: x[0]**2 + x[1]**2, [2, 2])==[0.0, 0.0]
  assert optimize_function(lambda x: x[0]**2 - x[1]**2, [1, 1])==[-1.0842021724855044e-19, -1.0842021724855044e-19]
  assert optimize_function(lambda x: x[0]**2 + x[1]**2, [])==None
  assert optimize_function(None, [1, 1])==None
output: def optimize_function(func, initial_guess):
      if func is None or not initial_guess:
          return None
      try:
          result = minimize(func, initial_guess)
          return result.x.tolist()
      except:
          return None