For soft cheeses like Brie I was told to do so only if I had cooked it myself and could guarantee that it had been boiling hot throughout - ie not gently cooked like say a custard might be. Hard unpasteurised cheeses like Parmesan would be fine even uncooked, as long as they had been stored properly. But, as ever, it's all conjecture anyway because nobody has been feeding pg women bits of raw/simmered/hardboiled cheese and seeing whether they get sick!