Avoid converting empty strings to double