Merge "Revert "Call isEmpty() instead of constructing a new object to compare""