You can't. You are supposed to assume that the gentlemen in riot gear armed with semi-automatic weapons and shotguns bursting through your door in the middle of the night yelling "POLICE!" are actually police. You are supposed to figure that out after being woken from a dead sleep and grabbing your gun while adrenalin dumps into your bloodstream from the fear and panic you are feeling thinking that you are being subjected to a home invasion and your wife and children are about to be raped and murdered. You are supposed to figure that out within seconds... and if you don't figure it out in time and act correctly then you may be dead or on trial for murdering a LEO.