I've pulled an ab muscle before, and I can tell you that it is one of the most painful experiences in the world.
One way to tell if it is in the muscle and not in the liver, stomach, etc... is by when you feel it. When I was suffering, I felt it in every movement. Breathing, Coughing...