input: Write a function to find the maximum value within a nested dictionary. If the dictionary is empty, return None.
  
  def findMaxValue(d):
      max_val = None
      for key, value in d.items():
          if isinstance(value, dict):
              nested_max = findMaxValue(value)
              max_val = max(nested_max, max_val) if max_val is not None else nested_max
          else:
              max_val = max(value, max_val) if max_val is not None else value
      return max_val
  
  sample_dict1 = {
      "key1": {
          "value1": 10,
          "value2": 20
      },
      "key2": {
          "value3": 40
      },
  }
  
  sample_dict2 = {
      "key1": {
          "value1": -5,
          "value2": -10
      },
      "key2": {
          "value3": -3
      },
      "key3": {
          "value4": {
              "value5": 7
          }
      }
  }
  
  sample_dict3 = {}
  
  assert findMaxValue(sample_dict1) == 40
  assert findMaxValue(sample_dict2) == 7
  assert findMaxValue(sample_dict3) == None
  
output: def findMaxValue(d):
      max_val = None
      for key, value in d.items():
          if isinstance(value, dict):
              nested_max = findMaxValue(value)
              max_val = max(nested_max, max_val) if max_val is not None else nested_max
          else:
              max_val = max(value, max_val) if max_val is not None else value
      return max_val