Give fields and field types a default value for 'no value submitted'. getFieldValues() returns null or not at all, but that's imperfect sometimes. 0 checkboxes checked should give an empty array, not null.
class FormField {
protected mixed $nullValue = null;
}
class CollectionType {
protected mixed $nullValue = [];
}
$this->add('optional_hobbies', 'checkboxes', [
'null_value' => [],
]);
or something.