Attempt to handle invalid/empty values

#4

Invalid values are converted to the zero value, e.g. when attempting to read an integer, "foo" becomes 0.