Unify null comparisons

| Q             | A
| ------------- | ---
| Fixed tickets | -
| License       | MIT
I've checked all JS conditions comparing with `null` in this PR and they all remain to work. All functions used in these conditions return `null` or a value.