input: Write a function to calculate the sum of the series 1 + ½ + ⅓ + ... + 1/n. The function should take an integer n as input and return the total sum. If the input is invalid (e.g., non-integer or negative), the function should return None.
  assert seriesSum(5)==2.283333333333333
  assert seriesSum(1)==1.0
  assert seriesSum(0)==None
  assert seriesSum(-1)==None
  assert seriesSum(10)==2.9289682539682538
output: def seriesSum(n):
      if not isinstance(n, int) or n < 1:
          return None
      return sum(1/i for i in range(1, n+1))