delete_old_terms now just does a None check and calls clear_keys with the old_terms ... seems like you can just call clear_keys directly and do the None check inside clear_keys