Adding some safety checks around a poor design decision (foisted upon us by other poor design decisions).