All methods should check validity of parameters.
For example, https://github.com/HubSpot/humanize/blob/master/src/humanize.js#L281
truncate(str, length = 100, ending = '...')
{
if (str && str.length > length) ...
}
This is useful when calling Humanize.truncate directly from data received from db queries and other external entities. Validating parameters outside (before calling the methods of Humanize) is code redundancy and can be avoided if the library takes care of it.