WICKET-5497 NPE in JsonUtils when the value is null

(cherry picked from commit 724066f406590a1b383a2476ee9983974f40ab80)