Fixed takeType to handle Any/AnyVal/AnyRef; fixed readFrame on heterogenous frame