When I started writing, most of the police department in New York City, especially above the rank of detective, were Irish, Irish-American. I thought it would be more interesting... to use the actual ethnic background in New York City at the time.
I only knew one thing about policemen: they were inhuman beasts. The problem was how to turn them into likable, sympathetic human beings. The answer was simple. Give them head colds. And first names. And keep their dialogue homey and conversational.
It seemed to me... that the only valid people to deal with crime were cops, and I would like to make the lead character, rather than a single person, a squad of cops.
Depending on what I'm working on, I come to the writing desk with entirely different mindsets. When I change form one to the other, it's as if another writer is on the scene.
I know that all cops are not sterling characters. But you have to have someone to root for. I balance it with rotten cops who will take a bribe, who will beat somebody up.