Cache the string comparison