Add check_key method.

Split out checking key.