One of the critically important things that you as a motorcyclist can do to avoid a serious injury accident is making sure that you are seeing the "big picture" in front of you on the road and that you are not just looking a few feet ahead of you. This is especially important when you are riding on the city streets, where other drivers are much more likely to make a sudden/illegal turn, swerve because of texting, unexpectedly stop or double park or open their door.
Is there a car in front of you that seems to be going slower than usual? This might be a warning sign that there is a driver in front of you that doesn't know where he is going, and who is likely to turn or make a you turn without being fully aware of your surroundings. Get out of his away as soon as possible.
Is there a driver that seems to be looking for parking? The longer he looks, the more excited he will be once he finds a spot, and the quicker he would try to get to it. If it's on his side of the road, it might not be a big deal, but if it's on the opposite side of the road, he may have to rush to that side by making a sudden (and illegal) turn. Again - stay away from him as much as possible. Pass that vehicle in a way where you would be out reach as soon as possible to prevent a situation where he would drive into you in an attempt to get that parking spot.