Change to use jquery isEmptyObject function