Using broad class groups only and without getting deep into subclasses etc.:How specific is a niche though? Lockpicking as the example, was once a "niche" of the Thief class. Well, except for the Knock spell.
But what about, say, the fighter? The closest thing I can think was ever a niche for them was getting weapon mastery, which is really specific. In contrast, wizards had cast spells from what I can tell. Clerics was Turn Undead.
Ideally the Fighter's niche should be being the best at both giving out and taking combat damage. They're still pretty good at taking it but their give-it-out niche has been slowly annihilated. (a sub-niche for a sub-group of Fighters could be archery)
The Cleric's niche should be healing and curing, with turning undead as a sidelight; but the healing niche has been watered down enough that turn undead is really all they've got left to call their own.
The Thief's niche should be sneakery and related things, including lockpicking and particularly indoors; but ever since day one there's been spells that blow this niche up (Knock, Pass Without Trace, Silence, Invisibility, the list goes on).
The Wizard's niche should be to be able to do things the others cannot, via magic. (a sub-niche for a sub-group of Wizards is that of messing with the mind and its perceptions, for Illusionists)
The Monk's niche should be hand-to-hand combat and flippy-flips, and this one's still fairly intact I think (one of the few!).
The Bard's niche should be charming, persuasion, and magic done via manipulation of sound - but sadly, the designers have never bothered giving Bards their own branch of sonic magic and so they end up functioning just like any other caster.