check for nil before accesing the hash object

for example this little piece of code show the issue which my patch fix.

require 'json-compare'
arr1 = [{"a"=>"b"}]
arr2= []
JsonCompare.get_diff(arr1,arr2)