Adding sanity checks to pix2ang and ang2pix