If you actually need to drill further (like into a stud,) you can stick a small drill bit into the hole, and confirm that it's a stud in the wall, and not a pipe. Also worth repeating: if for some reason you didn't follow this, and drilled deeper than 5/8″ into the wall, and you're hitting resistance, stop drilling.