Dunfield-Garoufalidis and Boyer-Zhang proved that the A-polynomial of a nontrivial knot in S3 is nontrivial. In this paper, we use holonomy perturbations to prove the non-triviality of the A-polynomial for a nontrivial, null-homotopic knot in an irreducible 3-manifold. Also, we give a strong constraint on the A-polynomial of a knot in the 3-sphere.