Line 285 assumes that `type` is present, and will crash if it's not.
Line 285 assumes that
typeis present, and will crash if it's not.