Good point, there's not currently any particular way to do that. I'll update the manual and add a condition for the next build.
Edit: actually, it returns an empty string, not 0. If you try to convert an empty string to a number you'll get NaN. There are also existing conditions to check if a key exists, or you can check if the key returned an empty string before trying to convert to a number.