checking for headers before trying to set on them

As a personal preference I like to use the struct literal method to initialize and this avoids having to include the net/textproto package and set this bit of boilerplate if I don't need to.