input: Write a function to calculate the compound interest given the initial investment amount, the rate of interest per period, and the time period in years. The function should return the final amount after compound interest has been applied. If any input is negative, return None.
  
  assert compoundInterest(1000, 5, 5) == 1276.2815625
  assert compoundInterest(500, 3, 10) == 671.958187093
  assert compoundInterest(2000, 7, 2) == 2297.7028000000005
  assert compoundInterest(0, 5, 5) == 0
  assert compoundInterest(1000, -5, 5) == None
output: def compoundInterest(initial_amount, rate, time_period):
      if initial_amount < 0 or rate < 0 or time_period < 0:
          return None
      final_amount = initial_amount * (1 + rate / 100) ** time_period
      return final_amount