See line 46; `hasFields` handles the `null` case.