Fixes #57: error in to_dict() when to-one attribute value is None
Merge branch 'master' to 'orm': bug fixed