input: Write a python function to safely evaluate a mathematical expression given as a string.
  assert evaluate("2 + 3 * 4") == 14
  assert evaluate("10 / 2 - 1") == 4.0
  assert evaluate("5**2 + (3 - 1)") == 27
output: def evaluate(expression: str) -> float:
      try:
          return eval(expression, {"__builtins__": None}, {})
      except:
          return None