Smelling something shouldn't trigger any sort of allergic reaction. For someone allergic, to say, peanuts, it would be inhaling peanut dust or peanut byproduct dust (like discarded shells). Also, adult onset allergies are rare and happens mostly if your body associates certain foods with certain pollen types.
Asking a doctor would still be recommended due to three reasons:
1. Can help you determine if it's a sensitivity or true allergy.
2. Can help you figure out a solution (allergy therapy, etc.) or the root cause (allergies are usually specific to compounds).
3. Self-diagnosed food allergy people are annoying.