there is a benefit to use `equals` here, instead of an `instanceOf`?