Backlog 756 5.2

The first commit has a straightaway fix for  BACKLOG-756 issue.
The second commit  has a fix for some unusual cases like 0.0 for number types.
The third commit has only code style changes.