change this to `if (fieldTypeHeader.length > 0)`, where I'm assuming my suggestion that `fieldTypeHeader` be an array