mod. refactor _check_lock.

Change-Id: Iad8de210a0e6fae22101f5e6951a6afb7b5ad01c