It should be placed as close to the potential source of leaking as possible because you want to eliminate the presence of fluid in the system as much as possible. Whatever length of tubing exists between the leak source and the cv is considered compromised. If, for instance, I had chosen to place the check valve directly next to the needle valve on my regulator, then water could siphon from the aquarium the tube all the way up to that point, which would cause me problems as I would need to drain the tube.
Also, check valves can fail over time. If my check valve fails, water still has to flow all the way through the tube before it reaches the regulator where it can do damage. If my cv were on the regulator end of my line, a failure would be much much more likely to result in water entering the regulator since the water would only need to travel less than an inch past the cv.
"Insanity: doing [or asking] the same thing over and over again and expecting different results."