input: Write a function to find the maximum value within a nested dictionary. The function should recursively check each dictionary and its nested dictionaries or values to find the maximum value. 
  
  def findMaxValue(dict):
      max_val = None
      for key, value in dict.items():
          if isinstance(value, dict):
              nested_max = findMaxValue(value)
              if max_val is None or (nested_max is not None and nested_max > max_val):
                  max_val = nested_max
          elif max_val is None or value > max_val:
              max_val = value
      return max_val
  
  sample_dict = {
      "key1": {
          "value1": 10,
          "value2": 20
      },
      "key2": {
          "value3": 40
      },
  }
  
  assert findMaxValue(sample_dict) == 40
  assert findMaxValue({"a": 5, "b": {"c": 10, "d": 3}}) == 10
  assert findMaxValue({}) == None
  assert findMaxValue({"x": {"y": {"z": 25}}, "a": {"b": 15}}) == 25
  assert findMaxValue({"e": 100}) == 100
output: def findMaxValue(dict):
      max_val = None
      for key, value in dict.items():
          if isinstance(value, dict):
              nested_max = findMaxValue(value)
              if max_val is None or (nested_max is not None and nested_max > max_val):
                  max_val = nested_max
          elif max_val is None or value > max_val:
              max_val = value
      return max_val