make the API refuse empty fields and require missing fields

The API expects empty fields to be omitted (no startField/endField). I'm making it throw an exception if that happens. Previously calling a startField/endField empty pair would create issues down the line.