input: Write a function to evaluate a postfix expression. The input to the function should be a string with the postfix expression. The output should be the evaluated value of the expression. If the input is empty or contains invalid characters, the function should return None.
  
  assert evaluate("2 3 + 4 5 * *")==46
  assert evaluate("10 2 + 3 4 * +")==24
  assert evaluate("5 3 -")==2
  assert evaluate("2 0 /")==None
  assert evaluate("")==None
output: def evaluate(expression):
      if not expression:
          return None
      stack = []
      for token in expression.split():
          if token.isdigit():
              stack.append(int(token))
          elif token in "+-*/":
              if len(stack) < 2:
                  return None
              b = stack.pop()
              a = stack.pop()
              if token == '+':
                  stack.append(a + b)
              elif token == '-':
                  stack.append(a - b)
              elif token == '*':
                  stack.append(a * b)
              elif token == '/':
                  if b == 0:
                      return None
                  stack.append(a // b)
          else:
              return None
      return stack[0] if len(stack) == 1 else None