chore: use triple equals comparison with typeof operator.

It is common practice for typeof operator to be used with '==='.

Closes #8009