[fix] variable set but unused
[fix] Passing null when non-null fixes (some corner cases)