Do glGet___() functions always modify the output variable, even on errors?

Examples:
glGetVertexAttrib, glGetInteger, glGetProgram, glGetVertexAttrib, glGetBufferParameter, etc.

Yes, this is an extremely minor optimization that is fairly unsafe and probably shouldn't be done. Since this question is implementation dependent, I'm looking at OpenGL 3.x and 4.x.