Check to make sure that keys exist before trying to delete them.