This happened to me once and I found it hard to accept that someone would even be mean-spirited at all. It can take some time to get over this, but at the end of the day I think you shouldn't be overly cautious about this. If you worry too much about people being jerks, the cost of missed opportunities is likely to outweigh the benefit of working with less jerks. If somebody turns out to be a jerk, just be nice and try to remove yourself from the situation as gracefully as possible with as little damage to everyone as possible.
As a side note, as with most things, the jerk/not-jerk distinction isn't binary. Most jerks will have a nice side and friends that don't consider them jerks. Of course that doesn't help you if they're being a jerk to you, but keep it in mind.