modified isEmpty so empty object {} returns false