Makes param_check safe.

Previously param_check out runtime panic if the json that was passed in was an array and not an object.

I also ran astyle on the file because spaces and tabs were mixed. The command I settled with was `astyle -s2 --style=java --indent-switches`

The actual code change is entirely in 904afa4 if y'all don't want to accept the style changes.