Adding another check so the before save data array has a the required type property.