input: Write a function to list the contents of a directory using Python. The function should return a list of strings representing the names of the files and directories in the specified directory. If the directory is empty, it should return an empty list.
  assert list_directory_contents(r"/path/to/directory")==['file1.txt', 'file2.txt', 'folder1', 'folder2']
  assert list_directory_contents(r"/path/to/empty_directory")==[]
  assert list_directory_contents(None)==None
output: def list_directory_contents(directory):
      if directory is None:
          return None
      try:
          return os.listdir(directory)
      except FileNotFoundError:
          return []