Better key validation.