IR check val field assign

And for `Select` it should even be `allowSideEffets`, I believe.