Check undefined instead of exists

If you change a field to be "", it will fail the
`if (field)` test.  Instead use _.isUndefined() to
see if the variable is specified in the json sent
by the client.

Fixes #141.