Would probably be reasonable to make a comment here that we're checking if the value we test is a regular expression or not, and if it's a regular expression we test it on the record property, else we just test if the two values are equal.