hasLock property Null safety

bool hasLock

Implementation

bool get hasLock => _lock != null;