input: Write a function to calculate the sum of the digits of a given number. If the number is negative, simply ignore the negative sign. If the input is not a digit, return -1. If the input is an empty string, return 0.
  assert sum_of_digits("6342")==15
  assert sum_of_digits("3454281")==27
  assert sum_of_digits("-456")==15
  assert sum_of_digits("a")==-1
  assert sum_of_digits("")==0
output: def sum_of_digits(s):
      if s == "":
          return 0
      if not s.lstrip('-').isdigit():
          return -1
      return sum(int(char) for char in s if char.isdigit())