remove unnecessary instanceof