Fixed issue with converting empty string or whitespace to the number 0

I believe this fixes issue #54 as well; although it's unclear if @Makskuk is talking about attributes or element values.