input: Write a function to generate a histogram in Python using the data provided. The function should use the data list and plot a histogram with specified bins. If the data list is empty, the function should handle this case gracefully.
  assert generate_histogram([3, 5, 7, 2, 8, 10, 11, 65, 72, 81, 99, 100, 150])==None
  assert generate_histogram([])==None
output: def generate_histogram(data):
      if not data:
          return None
      plt.hist(data, bins=10)
      plt.show()