Photoisomerizations involving nitrogen compounds