set values to null if undefined
added missing semicolons
Merge pull request #1 from floridoo/undefined_fix

Rethinkdb does not accept "undefined"