Federal prosecutors in New York are investigating whether Jeanine F. Pirro , the Republican candidate for state attorney general , and Bernard B. Kerik , the former New York City police commissioner , illegally taped conversations of Ms. Pirro 's husband last year to determine if he was having an affair .