Add a check for corrupt (empty) locks and throw a better error
Merge pull request #1262 from dsheets/check-corrupt-locks

Add a check for corrupt (empty) locks and throw a better error