Some basic tests for writing and reading types