input: Write a function to find the maximum value within a nested dictionary. The function should recursively traverse the dictionary to find and return the maximum value among all the leaf nodes.
  
  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({"key1": {"value1": 10, "value2": 20}, "key2": {"value3": 40}})==40
  assert findMaxValue({"level1": {"level2": {"level3": 15, "level3b": 50}, "level2b": 10}})==50
  assert findMaxValue({"a": 10, "b": 20, "c": {"d": 30, "e": {"f": 40}}})==40
  assert findMaxValue({})==None
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