Usually that is not okay. The Police have to have a reason to “stop” a car and that would usually require an alleged traffic violation. The police are usually permitted to respond to an accident or a check the welfare. If they stop a car for no reason, any evidence they obtain may be suppressed at a hearing.