SerializerHelper: inline methods near writePrimitive and writePrimitiveNoTag