def safe_add(x, y):
 if ((x is not None) and (y is not None)):
  return (x + y)
 elif (x is not None):
  return x
 elif (y is not None):
  return y
 else:
  return None

def safe_add ( x , y ) : if ( ( x is not None ) and ( y is not None ) ) : return ( x + y ) elif ( x is not None ) : return x elif ( y is not None ) : return y else : return None
adds two values which are either numeric types or none .