Wrote validate bit string method