All gardeners should test their soil to make sure they are being safe, especially in the city. If you are gardening in containers with store bought soils, you should be safe, but anyone who is gardening in the ground or is building raised beds should take special care to avoid lead or petrochemical contamination. Be careful when breathing in or touching soil you think may be contaminated.
State extension agencies offer reasonably priced soil testing. Look for a test that will detect check for you concerns, there are environmental tests that are different than fertility tests. Here are some options: