instanceof is fine after all.