IMO they should be treated as anything else -- does the world's development go in that direction? Does society allow research that would lead to them being created? How difficult is it to produce workable propellant and well-made components? In fantasy settings, it is likely easier to enchant a wand or similar to cast a basic spell, which would allow similar results, so do you have both, one, or neither?
It is also important to consider range, accuracy, reload speed, how many shots per reload, etc. A multi-barrel pistol is vastly different from a bolt-action rifle, which is vastly different from an SMG. If you have long range, high accuracy guns, do mages even exist, or did they all get sniped? If you have rapid-fire weaponry, how do people combat that? Be sure to consider the ramifications of each choice.
In my story, guns exist, but are incredibly uncommon, as hunting can be done just fine with a sling, bow, or crossbow, which are much easier to produce and supply ammo for. For combat, the mana mutating creatures often results in natural armor that would reduce the effectiveness, much as it makes swords and spears worse than staves and clubs. And since most armor is made of leather or scales, that protection carries over to humans as well. If they had modern firearms it might be different, armor-piercing ammo is pretty hard to beat, but flintlocks aren't exactly good at punching through tough targets.