can you please change this to `instanceof` it looks cleaner and it is also a bit faster