Don't return 0 from checkValue if value is empty string

Further to my previous change, without the check for decimals in checkValue, it's important to make sure that the string is not empty, otherwise checkValue returns '0' if the value is ''.

As far as I can tell, value will always be a string, so I think the if check I've added should be ok.