Where a charge is defective for the want of an averment which is an essential ingredient of the relevant offence, the defect shall, unless brought to the notice of the court before judgment, be cured by evidence at the trial proving the matter which should have been averred.