@davidanthoff I wanted to run this by you before preparing a PR.
I think it should be possible to represent missing data values in the result using either the DataValues package or the Missings package. Suppose that all the read_* functions had an optional Bool argument to control this choice with its value being stored in the ReadStatDataFrame. The handle_variable! function then ends with
push!(ds.data, ds.useMissings ? fill(Union{jtype, Missing}(missing), ds.rows) : DataValueVector{ds.rows))
I think the only additional changes would be to use
dest::Union{DataValueVector{T}, Vector{Union{Missing,T}}}
in the signature of the readfield! methods and to add the Missings package.
Shall I prepare a PR for your consideration?