input: Write a function to generate a random number between the given input numbers. The function should take two parameters, `start` and `stop`, and return a random integer between `start` (inclusive) and `stop` (inclusive). If the given input numbers are invalid or not provided, the function should handle it appropriately.
  assert random_num(0, 10)>=0
  assert random_num(0, 10)<=10
  assert random_num(10, 20)>=10
  assert random_num(10, 20)<=20
  assert random_num(-5, 5)>=-5
  assert random_num(-5, 5)<=5
output: import random
  
  def random_num(start=None, stop=None):
      if start is None or stop is None or start > stop:
          return None
      return random.randint(start, stop)