Dont always trust the debugger, I have had many of times where the debugger is just wrong about whats in the variable, just like in your case it says invalid when it really isnt, so if i were you i would just output the number with NSLog and see if it outputs (it will).
Daniel
2009-08-07 04:20:21