use an `instanceof` check here