Why the equality comparison instead of .isEmpty()?