I have a few simple rules...
First of all Know they're edible
I don't pick them too low to the ground in dog walking areas
Avoid anything growing near roads, due to traffic pollution.
Other than that, a good rinse in plenty of cold water should sort them out.
TBH there's probably more risk from grown berries, with sprays and pesticides.
I always find the best blackberries are to be found in a cowfield. Must be the manure.