input: Write a function to find the maximum value within a nested dictionary. The function should iterate through all the values, including nested dictionaries, and return the highest numerical value encountered. If the dictionary is empty, the function should return None.
  
  def findMaxValue(dict):
      max_val = None
      for key, value in dict.items():
          if isinstance(value, dict):
              max_val = max(findMaxValue(value), max_val)
          else:
              max_val = max(value, max_val)
      return max_val
  
  assert findMaxValue({"key1": {"value1": 10, "value2": 20}, "key2": {"value3": 40}}) == 40
  assert findMaxValue({"key1": {"value1": 5, "value2": 7}, "key2": {"value3": 12, "value4": 3}}) == 12
  assert findMaxValue({"key1": {"value1": 30}, "key2": {"value3": 25, "value4": 28}}) == 30
  assert findMaxValue({}) == None
output: def findMaxValue(dict):
      max_val = None
      for key, value in dict.items():
          if isinstance(value, dict):
              max_val = max(findMaxValue(value), max_val)
          else:
              max_val = max(value, max_val)
      return max_val