Implemented validation for optional fields of JSON object.

Signed-off-by: Daniel (dmilith) Dettlaff <dmilith@verknowsys.com>