Initial go at `assertType` utility function