add proper conversion for *struct
Merge pull request #7 from hirochachacha/add_proper_conversion_for_struct_or_nil

add proper conversion for *struct