input: Write a function to find the maximum value within a nested dictionary. The function should recursively traverse through each sub-dictionary to find the maximum value. If the dictionary is empty, the function should return `None`.
  
  assert findMaxValue({})==None
  assert findMaxValue({"key1": 10})==10
  assert findMaxValue({"key1": 10, "key2": 20})==20
  assert findMaxValue({"key1": {"key2": 30, "key3": {"key4": 40}}})==40
  assert findMaxValue({"key1": {"value1": 10, "value2": 20}, "key2": {"value3": 40}})==40
output: def findMaxValue(d):
      if not d:
          return None
      max_value = None
      for key, value in d.items():
          if isinstance(value, dict):
              nested_max = findMaxValue(value)
              if nested_max is not None:
                  if max_value is None or nested_max > max_value:
                      max_value = nested_max
          else:
              if max_value is None or value > max_value:
                  max_value = value
      return max_value