#2533028 Fix incorrectly parsing empty string as 0

http://yuilibrary.com/projects/yui3/ticket/2533028

Fixed the parsing code and added test code for this issue.