Actually I think compiler will complain about type erasure... so no better solution than asInstanceOf ;)