Add a means to pass in a string comparison, to allow for more robust error reporting in the string comparison failure case.