better checks in tests - thanks @cyli