Do not provide ID ever (unless driving, since it also happens to be your DL) and do not answer questions as to whether you have ID.
The amount of paperwork they'll need to fill out in order to arrest you (and thus allow them to search you [the claim will be that the search is for weapons for their safety, but anything they find is free for them to use/look at, incl your ID, if you even have it]) makes it not worth it for them. They'll just find a stupider victim.
Disclaimer: IANAL, but i do often end up in court with cops over a lot of things, this included, and have not yet paid any fines