split out some sanity_check stuff
split out the "optional" trait