input: Write a function to optimize the given Python code by providing an efficient approach to print each element in the list 'numbers' on a new line. If the provided input is an empty list or not a list, the function should return an appropriate message.
  assert optimize_print([1, 2, 3, 4, 5, 6])==None
  assert optimize_print([])=='Input list is empty or not a list'
  assert optimize_print('string')=='Input list is empty or not a list'
  assert optimize_print((1, 2, 3))=='Input list is empty or not a list'
output: def optimize_print(numbers):
      if not isinstance(numbers, list) or not numbers:
          return 'Input list is empty or not a list'
      for num in numbers:
          print(num)