Add sanity checks to make sure valid keys are passed into the methods