Yes someone did ask me this once. When I participated in a ghost hunt one of the spiritual mediums told us how to protect ourselves from unwanted negative ghostly goings on.
The practise is known as Grounding or Protecting. It is not just used in ghost hunting, it is also using in meditation and pagan/wiccan practises.
Below are a few example of how this can be used:
Imagine you are sitting in an egg of light. The base of the egg is sitting just below the floor (so you are grounded) and you are surrounded in your egg by a protective colour (Gold, Silver, Violet or Blue). Ensure that your eggshell is solid so that no negative energy can penetrate it. Any negative thoughts/emotions that you may have will not get out and no negative thoughts/emotions from others will be allowed in.
Wear protective colours
Gold, Silver, Violet or Blue
Wear or carry crystals with a protective quality
Amethyst, Lapis Lazuli, Sugilite, Laramar, Gold Tigers Eye and Hawks Eye (blue tigers eye) for psychic protection.
Wear or use protective symbols
The Egyptian Ankh, Rune symbol, Star of David (six pointed star), Circle, Egg, Pentagram (five pointed star, especially for Wiccans/Pagans), Pyramid or Cross. Symbols are very personal things, so only wear or carry what feels right for you and what you are comfortable with.