A planetary nebula is a nebula that is made up of gas and plasma . They are made by certain types of stars when they die . A planetary nebula is an emission nebula consisting of an expanding glowing shell of ionized gas ejected during the asymptotic giant branch phase of certain types of stars late in their life .