releaseLock method Null safety

void releaseLock()

Implementation

void releaseLock() {
  lock = false;
}