input: Write a function to complete the Python class so that it can calculate the sum of two integers. If the given input is a valid instance of the class, return the sum of its two attributes, otherwise return None.
  assert Sum(3, 4).add()==7
  assert Sum(-1, 1).add()==0
  assert Sum(0, 0).add()==0
  assert Sum(10, -5).add()==5
  assert Sum(2, 2).add()==4
output: class Sum:
      def __init__(self, a, b):
          self.a = a
          self.b = b
  
      def add(self):
          return self.a + self.b