When given an empty or whitespace-only string, the exception Invalid argument. Expected non-empty string. is thrown. This is because the library used to match nearly-correct licences (spdx-correct) doesn't allow empty or whitespace-only strings as input.
This library shouldn't bother calling spdx-correct when given an empty or whitespace-only string, instead just returning false with the generic warning message.