MySQL UPDATE外键约束失败

For starters, I have seen other answers, and they solve the problem of the other similar questions, but I don't understand the reason for the failure or how to solve it, because other answers say things like "check if the record exists in another table to insert their correct relationship, otherwise this error occurs". That has no relevance to what I'm trying to do (I think); I simply want to update the data of a particular item in a table, I don't want to update any relationships, just the foreign key ID.

This is my error:

Error 1452: Cannot add or update a child row: a foreign key constraint fails (app.item, CONSTRAINT item_tax_fk FOREIGN KEY (tax_id) REFERENCES tax (id))

This is my query (the question marks will be converted to values):

UPDATE item
SET tax_id = ?, name = ?, description = ?, price = ?
WHERE id = ?
LIMIT 1

This is the relevant schema:

CREATE TABLE tax (
    id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,

    name VARCHAR(255) NOT NULL,
    rate FLOAT NOT NULL,

    created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
    deleted_at TIMESTAMP NULL DEFAULT NULL,

    PRIMARY KEY (id)
);

CREATE TABLE item (
    id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,

    tax_id INT(10) UNSIGNED NULL DEFAULT NULL,
    name VARCHAR(255) NOT NULL,
    description VARCHAR(1000) NOT NULL,
    price FLOAT NOT NULL,

    created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
    deleted_at TIMESTAMP NULL DEFAULT NULL,

    CONSTRAINT `item_tax_fk` FOREIGN KEY (`tax_id`) REFERENCES `tax` (`id`),

    PRIMARY KEY (id)
);

This is my function:

func (r *ItemRepository) UpdateByID(itemId int, item *domain.Item) error {
    var err error

    if item.Tax == nil {
        _, err = r.db.Exec(`
            UPDATE item
            SET tax_id = ?, name = ?, description = ?, price = ?
            WHERE id = ?
            LIMIT 1
        `, "NULL", item.Name, item.Description, item.Price, itemId)
    } else {
        _, err = r.db.Exec(`
            UPDATE item
            SET tax_id = ?, name = ?, description = ?, price = ?
            WHERE id = ?
            LIMIT 1
        `, item.Tax.ID, item.Name, item.Description, item.Price, itemId)
    }
    if err != nil {
        return err
    }

    return nil
}

Why do I get this error? How can I resolve it?

Fixed thanks to @Barmar. Had to change "NULL" to nil. " When a string is converted to a number, it becomes 0 if it doesn't begin with digits".

func (r *ItemRepository) UpdateByID(itemId int, item *domain.Item) error {
    var err error

    if item.Tax == nil {
        _, err = r.db.Exec(`
            UPDATE item
            SET tax_id = ?, name = ?, description = ?, price = ?
            WHERE id = ?
            LIMIT 1
        `, nil, item.Name, item.Description, item.Price, itemId)
    } else {
        _, err = r.db.Exec(`
            UPDATE item
            SET tax_id = ?, name = ?, description = ?, price = ?
            WHERE id = ?
            LIMIT 1
        `, item.Tax.ID, item.Name, item.Description, item.Price, itemId)
    }
    if err != nil {
        return err
    }

    return nil
}