From http://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object-from-json