Remove todo and improve instanceof Statement