If there wasn't any mention of the dead man's profession then most of the people on here would be lauding the homeowner and saying it was a good shoot. The dead man's job doesn't change that. The fact that he was a cop means that there is a very high chance the perp was armed while prowling around the house which would make it a perfectly legal shooting in many states as it puts the life of the homeowner and his family in jeopardy.
You just hit the nail on the head with a 200 pound hammer!