handle strings and arraybuffers correctly, implement ext types