Error Code: 1366. Incorrect integer value: ' ' for column 'branch_id' at row 20

I am currently new in SQL. I am using myySQL and when trying to upload data in a column for which i have null values in some cases i get the response in the topic. My script for the creation of the table is:

CREATE TABLE `transactions` (
  `Card_number` varchar(20) NOT NULL,
  `idtransactions` int(11) unsigned NOT NULL,
  `amount` decimal(8,2) NOT NULL,
  `tra_date` date NOT NULL,
  `tra_time` time NOT NULL,
  `branch_id` INT(3) DEFAULT NULL,
  PRIMARY KEY (`idtransactions`),
  UNIQUE KEY `idtransactions_UNIQUE` (`idtransactions`),
  KEY `branch_id_idx` (`branch_id`),
  KEY `Card_number_idx` (`Card_number`),
  CONSTRAINT `Card_number` FOREIGN KEY (`Card_number`) REFERENCES `card` (`Card_number`),
  CONSTRAINT `branch_id` FOREIGN KEY (`branch_id`) REFERENCES `branch` (`branch_id`)
) ;

The file from which I am trying to upload the data is encrypted as UTF8. In case I put a value, eg. "null" for the fields without a value in uplod file I get different errors refering to primary key to the father table. Is there is something i have done wrong? Thank you in advance.