fix(scope): fix null comparisons

Closes #646