input: Write a function to find the maximum value within a nested dictionary. The function should return the highest value found in the nested structure. Given the complexity of the dictionary, the function should recursively search through sub-dictionaries to find the maximum value.
  
  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
  
  sample_dict = {
      "key1": {
          "value1": 10,
          "value2": 20
      },
      "key2": {
          "value3": 40
      },
  }
  
  assert findMaxValue(sample_dict) == 40
  assert findMaxValue({}) == None
  assert findMaxValue({"key1": 5, "key2": 3}) == 5
  assert findMaxValue({"key1": {"subkey": 10}, "key2": 8}) == 10
  assert findMaxValue({"key1": {"subkey1": 8, "subkey2": 12}, "key2": {"subkey3": 15}}) == 15
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