SPARC NCG: Split out sanity checking into its own module