Don't insert checks directly, use runtime lib

Insert checks via calls to the runtime library, not via an IR builder.