Remove nil values before saving the form

fixes #189