field_encoder: support non-string fields. more tests

- previously only subbed Fields that were strings because of
  type-casting with `.(string)`
- more tests to cover multiple types (string, int, bool, and
  nonexistent/undefined)