If you are using a match expression for non-identity checks as described above make sure whatever you are using is actually returning `true` on success.
Quite often you rely on truthy vs. falsy when using if conditions and that will not work for match (for example `preg_match`). Casting to bool will solve this issue.