Made JSDoc linting function more robust.