Phantosmia is the medical term for identifying/ detecting phantom smells.
When we smell, tiny molecules from the surface of the object evaporate and travel up the nose to specialised nerve cells (Olfactory sensory neurons). These neurons have receptors that send electrical signals to the brain which in turn identify the smell. We smell both through the nostrils and the throat to the back of the nasal cavity. When we chew, odour molecules are released which are pushed into the back of the nasal cavity by the tongue when we swallow.
There are a range of conditions that could result in phantosmia including nasal infection or polyps, dental problems, migraine, smoking and chemical exposure. It may be something do do with your sense of taste and not smell at all.
The important thing is that you should see your GP who will check there is nothing stuck in the nasal passage and then may refer you to an ear, nose and throat specialist for further tests.
Sometimes the phantosmia will gradually reduce over a few months with no treatment needed. Other times it is a sign of an illness that needs to be addressed.