add IsLock method

fixed #47