Handle the situation when a struct has no fields
Removed the restriction about unexported fields