Simple function to parse a string and compare it against an object.