input: Write a function to modify the given Python code to handle errors. Specifically, the function should account for cases where the file does not exist or where the file content is not in a valid JSON format. If the file does not exist, display a message saying "The file specified does not exist.". If the file content is not valid JSON, display a message saying "The file specified is not in a valid JSON format.".
  assert read_data_from_json("example.json") is None # File does not exist
  assert read_data_from_json("invalid_json.json") is None # Invalid JSON format
  assert read_data_from_json("valid_json.json") == {"key": "value"} # Valid JSON file
output: def read_data_from_json(filename):
      try:
          with open(filename, 'r') as file:
              data = json.load(file)
              return data
      except FileNotFoundError:
          print("The file specified does not exist.")
          return None
      except json.JSONDecodeError:
          print("The file specified is not in a valid JSON format.")
          return None