input: Write a function to find the maximum value within a nested dictionary. If the dictionary or any of its nested dictionaries are empty, return `None`.
  
  def findMaxValue(dict):
      max_val = None
      for key, value in dict.items():
          if isinstance(value, dict):
              nested_max = findMaxValue(value)
              if nested_max is not None:
                  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
  
  assert findMaxValue({})==None
  assert findMaxValue({"key1": 10, "key2": 20})==20
  assert findMaxValue({"key1": {"value1": 10, "value2": 20}, "key2": {"value3": 40}})==40
  assert findMaxValue({"key1": {"value1": {"nested1": 10}}, "key2": {"value3": 40}})==40
  assert findMaxValue({"key1": {"value1": {"nested1": 50}}, "key2": {"value3": 40}})==50
output: def findMaxValue(dict):
      max_val = None
      for key, value in dict.items():
          if isinstance(value, dict):
              nested_max = findMaxValue(value)
              if nested_max is not None:
                  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