input: Write a function to modify and handle errors in the given Python function read_data_from_json(filename). The modified function should include error handling for cases where the file does not exist and for cases where the file content is not in valid JSON format. The function should print appropriate messages for these errors and return None if an error is encountered.
  assert read_data_from_json("valid_file.json")==json.load(filename)
  assert read_data_from_json("nonexistent_file.json")==None and print output: "The file specified does not exist."
  assert read_data_from_json("invalid_format.json")==None and print output: "The file specified is not in a valid JSON format."
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