Fixes bug when user attempts to create task with no value field through the API

If the user posts a new task with no value, it got set to NaN in the new task, which ended up getting really nasty as numbers got appended to the string "NaN" into the database... so you'd end up with stuff like NaN.9.8.7 instead of a number.

Also, the sanitize functions weren't actually being saved, as they were put in variables that weren't being persisted into the db.