Added in an isset check because if you set a flash type that is not in our expected index it will throw a undefined index error