add NULL check in case the header is too long to be stored in the header table