Maybe use `instanceof` instead?