Move the ref and const checking to argument.