Returns true if the provided string can be parsed as YAML.
This should not be used in performance sensitive contexts.