I would even remove this check altogether and just return the best match overall. (Incidentally, is the matching category unused? Is there code anywhere else that determines the correct category?)