input: Write a function to calculate the sum of all even numbers less than or equal to a given integer n. If n is zero or negative, the function should return 0. If the input is not a valid integer, the function should return -1.
  assert sum_of_even_numbers(10)==30
  assert sum_of_even_numbers(-5)==0
  assert sum_of_even_numbers(0)==0
  assert sum_of_even_numbers(7)==12
  assert sum_of_even_numbers("abc")==-1
output: def sum_of_even_numbers(n):
      if not isinstance(n, int):
          return -1
      if n <= 0:
          return 0
      return sum(i for i in range(0, n + 1, 2))