input: Write a function to find the maximum value within a nested dictionary. The function should recursively search through all the dictionary's values and return the highest number found. If the dictionary is empty, the function should return None.
  
  sample_dict = {
      "key1": {
          "value1": 10,
          "value2": 20
      },
      "key2": {
          "value3": 40
      },
  }
  
  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(sample_dict) == 40
  assert findMaxValue({"key1": 10}) == 10
  assert findMaxValue({"key1": {"key2": {"key3": 50}}}) == 50
  assert findMaxValue({}) == None
  assert findMaxValue({"key1": {"key2": 20, "key3": 30}}) == 30
output: def findMaxValue(dict):
      max_val = None
      for key, value in dict.items():
          if isinstance(value, dict):
              max_val = max(findMaxValue(value), max_val) if max_val is not None else findMaxValue(value)
          else:
              max_val = max(value, max_val) if max_val is not None else value
      return max_val