changing error condition to when there is actually an error
changing error condition to when there is actually an error

stan-dev/stan,stan-dev/stan,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/stan,stan-dev/stan,stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math