You are safe consuming cultivated mushrooms raw, but with many of the wild mushrooms you are better off cooking them first. One of my friends, an avid mushroom hunter and amateur mycologist once told me that many wild mushrooms do contain trace amounts of substances that are not good for us. Many will just cause minor digestive tract upset. But cooking wild mushrooms destroys these substances. Don't know if there is any truth in what he told me but since then I've always cooked any wild, foraged mushrooms that I have, with the exception of taking small nibbles of them, but not eating them raw in any quantity.