Tips on getting perfectly aligned shots with framed artwork

I need to start shoting some framed artwork, hanging on the wall. I’m struggling with how to make sure my lines are perfectly straight and everything is level with all of the variations in the wall, the painting hanger, tripod/floor level etc.

Is there an easy way to make sure the painting and angles are correct so there is no distortion in the plane, right angles, straight lines etc?