Avoiding creating strings with NULL pointers when dealing with empty header values