nir/spirv: Beef up the type system a bit