Error checking in production software

Is it expected for production grade CUDA code to have error checking around all of the GPU operations like cudaMalloc? Or is it more idiomatic to remove the checks once you have checked that the operations are correct.

Also when error checking in CUDA 9+, should one do something along the lines of this stackoverflow answer - ?(asking since it is a rather old answer)