Jquery check if object is empty. isEmptyObject() method in jQuery.