input: Write a function to generate a histogram using the given data in Python. The function should plot the histogram and return the resulting plot. If the data array is empty, the function should return None.
  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
      import matplotlib.pyplot as plt
      plt.hist(data)
      plt.show()
      return plt