Changed to instanceof