The reason he (or others) might wear their pistol backwards is because it enables a seated person to draw easier than if the gun was in the more "traditional" style. This is called "Cavlary Style" or Cavalry draw as noted here (https://en.wikipedia.org/wiki/Cavalry_draw)
ps: I would have felt better leaving this as a comment than a specific answer, but I'm ...
There is only one scene where Kevin Hart wears his police uniform with a gun. He never had his gun backwards.
You can see his gun in the above picture.
You can see a taser here.
You could have been confused because he is carrying a lot of things on his belt.
I doubt it was a goof that was overlooked. It could be an intentional "gaffe" to emphasize his ineptness.
Also, there were some westerns where the gunslinger prefers reaching across his body for a less restricted "draw" and wears his guns backwards. No idea if that's a real thing, but definitely was intended for a certain amount of badass "cool," so it ...