I'll summarize the points above (and add my own) for finding out if a wild code is valid or not:
1) If you type in the code in the Club Nintendo website without logging in first, it will always show you the value of the coins you can earn if you create an account, even if the code has already been redeemed. This is no indication of finding out if a code works or not, but it can be handy if you don't want to sift through the eligible titles list to find out the current value if its an active code.
If you do this first with a valid, non-redeemed code, you won't risk burning the code / locking it into redeeming the points, because there is no account to associate this with.
2) If you type in the code while logged in, and it is a valid code for a game you haven't redeemed, then it will automatically put the registration survey under your To Do list, which you have 7 days (or 14 days, I forget which) to fill out the survey for the registration coins.
Obviously if you are trying to sell / trade these coins and trying to find out if they are valid, don't even think about doing this while logged in, its a pointless exercise towards your end game plan of bartering them off (unless you have like, 10 CN codes for the same game, then the first one is a sacrifice, see point 4).
3) If you type in the code while logged in, and it its in invalid code, then it will simply say this code has already been registered, and that's that.
4) If you type in a code while logged in, for a valid code, for a game that you already have registered in your CN, then you will get a blank message on the next page. No already redeemed message, no survey popping up, no code could be worth this much, just a blank box next to the normal CN page information.
This is the only way to really truly know (without contacting Nintendo directly, of course) if a code is valid without redeeming it. Which means that the only way of checking for a code validity is if you A) already have the game registered under your CN profile, or B) find someone that you absolutely trust that has already registered that game, and have them type the code in while logged on to CN.
Hope this clears things up for this question I hear often enough.