Properly handle non date statements
Nice error message when value can't be encoded