Outside the Earth’s atmosphere, was it safe for the Apollo astronauts to image the Sun?

Outside the Earth’s atmosphere, was it safe for the Apollo astronauts to image the Sun?
By constraining the age of the seven-planet system, we can better our understanding of its habitability