Adding a guard to ignore nil fields

Not serialising nil fields into JSON
Merge pull request #20 from ccare/reject-nil-fields

Ignoring nil fields