detect key before get