add type check for readJson parameters

partially should fix exceptions while working with received messages

Jira-issue: WP-1258
Merge pull request #57 from aldafu/WP-1258-fix-type-error

add type check for readJson parameters