detect nullable types and call nullify in toStruct
Merge pull request #37 from MartinNowak/nullify

detect nullable types and call nullify in toStruct