Remove explicit isinstance checkes.