simplify cast with List and Map containing Serializables