btree key validation