It's actually not a bad idea depending on where you live. Here in PGC, we have community cops, which are basically police that are assigned to particular areas, so if there's ever a problem, you know exactly who's going to be there.
I never invited a cop in to eat or anything, but I did get to know our community cop so that if there was a problem I could talk to him, and he actually handled it without it turning into anything extra.
That's how policing is supposed to work. It's unfortunate that it doesn't. I say all that to say that if it's possible to actually build a relationship with the cops that handle your area, you might be able to save yourself some headaches in the future and maybe even some lives.