Add isValid and toString methods to Header class.