Simplify whitelist matching logic