diff --git a/license_sh/helpers.py b/license_sh/helpers.py
index a7c4139..686f980 100644
--- a/license_sh/helpers.py
+++ b/license_sh/helpers.py
@@ -97,7 +97,7 @@ def is_license_ok(license_text, whitelist):
     try:
         license = licensing.parse(license_text)
     except:
-        return license_text in whitelist
+        return f"{license_text}" in whitelist
 
     if license is None:
         return None

Package whitelisting
I am trying to white-list certain packages but they are still failing

```
bunyan-format - 0.2.1 - {'type': 'MIT', 'url': 'https://github.com/thlorenz/bunyan-format/blob/master/LICENSE'}
```
```
pako - 1.0.10 - (MIT AND Zlib)
```

They are present in the config
```
{
  "projects": [
    {
      "directory": ".",
      "type": "npm"
    }
  ],
  "whitelist": [
    "ISC",
    "Unlicense",
    "CC-BY-4.0",
    "BSD-3-Clause",
    "MIT",
    "BSD-2-Clause",
    "(BSD-3-Clause OR GPL-2.0)",
    "CC0-1.0",
    "Apache 2",
    "Apache-2",
    "(MIT AND Zlib)",
    "(MIT AND BSD-3-Clause)",
    "BSD",
    "MPL-2.0",
    "Apache-2.0",
    "CC-BY-3.0",
    "{'type': 'MIT', 'url': 'https://github.com/thlorenz/bunyan-format/blob/master/LICENSE'}",
    "MIT/X11",
    "(MIT AND CC-BY-3.0)"
  ]
}
```
diff --git a/tests/runners/test_helpers.py b/tests/runners/test_helpers.py
index 3e77f28..1a0f966 100644
--- a/tests/runners/test_helpers.py
+++ b/tests/runners/test_helpers.py
@@ -6,6 +6,7 @@ from anytree.exporter import DictExporter
 from license_sh.helpers import (
     flatten_dependency_tree,
     annotate_dep_tree,
+    is_license_ok,
     extract_npm_license,
     get_npm_license_from_licenses_array,
     UNKNOWN,
@@ -225,6 +226,29 @@ class NpmRunnerTestCase(unittest.TestCase):
         _, unknown_licenses = annotate_dep_tree(tree, whitelist, ignored_packages)
         self.assertSetEqual(set({"GPL"}), unknown_licenses)
 
+    def test_is_license_ok_simple(self):
+        self.assertEqual(is_license_ok("MIT", ["MIT"]), True)
+
+    def test_is_license_ok_negative(self):
+        self.assertEqual(is_license_ok("MIT", [""]), False)
+
+    def test_is_license_ok_brackets(self):
+        self.assertEqual(is_license_ok("MIT AND Zlib", ["MIT", "Zlib"]), True)
+
+    def test_is_license_ok_json(self):
+        self.assertEqual(
+            is_license_ok(
+                {
+                    "type": "MIT",
+                    "url": "https://github.com/thlorenz/bunyan-format/blob/master/LICENSE",
+                },
+                [
+                    "{'type': 'MIT', 'url': 'https://github.com/thlorenz/bunyan-format/blob/master/LICENSE'}"
+                ],
+            ),
+            True,
+        )
+
     def test_extract_npm_license_None_data(self):
         name = extract_npm_license(None, None)
         self.assertEqual(name, None)

pip install -e .[dev]
parse_log_pytest
Pipfile
pytest
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiohttp==3.8.6
aiosignal==1.3.1
anytree==2.12.1
async-timeout==4.0.3
asynctest==0.13.0
attrs==24.2.0
boolean.py==4.0
certifi @ file:///croot/certifi_1671487769961/work/certifi
charset-normalizer==3.4.1
docopt==0.6.2
exceptiongroup==1.2.2
frozenlist==1.3.3
idna==3.10
importlib-metadata==6.7.0
iniconfig==2.0.0
license-expression==30.2.0
-e git+https://github.com/webscopeio/license.sh.git@4beafdc738929e4008860f4b670550f5ea50c8c1#egg=license_sh
multidict==6.0.5
packaging==24.0
pipdeptree==2.9.6
pipfile==0.0.2
pluggy==1.2.0
prompt_toolkit==3.0.48
pytest==7.4.4
questionary==1.10.0
six==1.17.0
termcolor==2.3.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==2.0.1
typing_extensions==4.7.1
urllib3==2.0.7
wcwidth==0.2.13
yarl==1.9.4
yaspin==2.4.0
zipp==3.15.0

name: license.sh
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - pipfile=0.0.2=py_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aiohttp==3.8.6
      - aiosignal==1.3.1
      - anytree==2.12.1
      - async-timeout==4.0.3
      - asynctest==0.13.0
      - attrs==24.2.0
      - boolean-py==4.0
      - charset-normalizer==3.4.1
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - frozenlist==1.3.3
      - idna==3.10
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - license-expression==30.2.0
      - multidict==6.0.5
      - packaging==24.0
      - pipdeptree==2.9.6
      - pluggy==1.2.0
      - prompt-toolkit==3.0.48
      - pytest==7.4.4
      - questionary==1.10.0
      - six==1.17.0
      - termcolor==2.3.0
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - wcwidth==0.2.13
      - yarl==1.9.4
      - yaspin==2.4.0
      - zipp==3.15.0
prefix: /opt/conda/envs/license.sh

tests/runners/test_helpers.py::NpmRunnerTestCase::test_is_license_ok_json
tests/runners/test_helpers.py::NpmRunnerTestCase::test_annotate_dependency_tree tests/runners/test_helpers.py::NpmRunnerTestCase::test_bad_licenses_identified tests/runners/test_helpers.py::NpmRunnerTestCase::test_bad_licenses_identified__one_package_ignored_by_package_whitelist tests/runners/test_helpers.py::NpmRunnerTestCase::test_bad_licenses_identified_are_ignored_by_package_whitelist tests/runners/test_helpers.py::NpmRunnerTestCase::test_dependency_tree_is_flattened tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_license_None_data tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_license_None_version tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_license_from_versions tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_license_global_priority tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_license_no_version tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_license_no_version_license tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_license_no_versions tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_license_simple tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_licenses_global_empty tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_licenses_global_multiple tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_licenses_global_single tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_licenses_specific_version_multiple tests/runners/test_helpers.py::NpmRunnerTestCase::test_extract_npm_licenses_specific_version_simple tests/runners/test_helpers.py::NpmRunnerTestCase::test_get_npm_license_from_licenses_array_None tests/runners/test_helpers.py::NpmRunnerTestCase::test_get_npm_license_from_licenses_empty tests/runners/test_helpers.py::NpmRunnerTestCase::test_is_license_ok_brackets tests/runners/test_helpers.py::NpmRunnerTestCase::test_is_license_ok_negative tests/runners/test_helpers.py::NpmRunnerTestCase::test_is_license_ok_simple
license_sh/helpers.py
license_sh/helpers.py