Parse YAML safely