input: Write a function to calculate the distance between two points in a 2D plane given their coordinates. The function should return the distance as a floating-point number. If the coordinates are invalid (e.g., non-numeric), the function should raise a ValueError.
  assert distance_between_points(2, 7, 4, 9) == math.sqrt(4 + 4)
  assert distance_between_points(0, 0, 0, 0) == 0.0
  assert distance_between_points(3, 4, 3, 17) == 13.0
  assert distance_between_points(-1, -1, 7, 3) == math.sqrt(64 + 16)
  try:
      distance_between_points(2, 'a', 4, 9)
      assert False  # Should not reach here
  except ValueError:
      assert True
output: def distance_between_points(x1, y1, x2, y2):
      if not (isinstance(x1, (int, float)) and isinstance(y1, (int, float)) and isinstance(x2, (int, float)) and isinstance(y2, (int, float))):
          raise ValueError("Invalid coordinates")
      return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5