def check_syntax_valid?(yaml_data, errors_array)
      YAML.safe_load(yaml_data)
      true
    rescue YAML::SyntaxError => e
      errors_array << e.message
      false
    end
def check_syntax_valid?(yaml_data, errors_array)
      YAML.safe_load(yaml_data)
      true
    rescue YAML::SyntaxError => e
      errors_array << e.message
      false
    end
Check that the data is valid YAML