input: Write a function to make the given Python code snippet more efficient by reducing the number of conditional checks. The function should determine the commission rate based on the gross sales amount. If the gross sales are greater than or equal to 10000, the commission rate is 0.1. If the gross sales are greater than or equal to 5000 and less than 10000, the commission rate is 0.07. If the gross sales are less than 5000, the commission rate is 0.05. If the gross sales value is not provided or is invalid, it should return None.
  assert determine_commission_rate(12000) == 0.1
  assert determine_commission_rate(7500) == 0.07
  assert determine_commission_rate(3000) == 0.05
  assert determine_commission_rate(5000) == 0.07
  assert determine_commission_rate(-500) == None
output: def determine_commission_rate(gross_sales):
      if gross_sales is None or gross_sales < 0:
          return None
      elif gross_sales >= 10000:
          return 0.1
      elif gross_sales >= 5000:
          return 0.07
      else:
          return 0.05