Use '==' instead of 'compare == 0' for string comparison and 'length' instead of 'compare != 0' when checking for empty strings