Pull out the checking functionality out of LoadedYaml in a separate library-like file