How do you tell if they're a bona-fide nonprofit?
Go to http://www.guidestar.org/ and look them up.
This can go faster if you ask for their EIN (Employer Identification Number), which is a "Social Security Number for businesses" (it comes from the same number pool, but unlike SSNs it's not a secret and is a very public number for a nonprofit. The format is changed: xx-yyyyyyy).
They should be able to bark out their EIN almost immediately, since they work with it all the time. I regularly ask fundraisers for it, because if they balk, that tells me they are probably fake. Plug that EIN into Guidestar and see what comes up, if anything.
There are for-profit private fundraising companies who collect donations on behalf of charities, but actually deduct their business expenses from what goes to the charity. As a result charities get as little as 9 cents on the dollar.
Can you take a tax deduction for this?
Probably not. You must be already taking enough tax deductions (mortgage interest, healthcare, a few other things) that you exceed the Standard Deduction. And since certain tax reforms raised the Standard Deduction from ~$5000 to ~$12,000 while eliminating the ~$5000 personal exemption, that dramatically reduced how many people itemize. For a short time, everyone could deduct about $300 a year. Unless Congress reinstates this, you can't anymore.
As a nonprofit manager, I have stopped claiming gifts are tax deductible. Because like 90% of our donors who could before, can't now. It's a gut-punch to charities, but on the upside all those people have simpler taxes.
Tax deduction means that you take the deducted amount and remove it from your adjusted gross income. So if your deduction is $2000, you pay the same tax as if you had earned $2000 less income that year.
When donating things not directly fungible to cash, you must use the actual fair market value - i.e. the real value you could actually sell the item for on eBay or Craigslist. In fact, "eBay completed auctions" which did sell are a good proof of value if you are audited. Audits happen 2-3 years later, and eBay etc. will have purged that data by the time you are audited, so collect that data now. "Save to PDF" is probably good enough.
Is it better to sell and then donate cash?
Maybe... but NOT on things which have appreciated (increased in value) especially securities (stocks) - in that case donate the item to the charity. If you held it longer than 1 year, your tax deduction is based on the appreciated (present) value. But here's the gotcha. If you sell it, you must pay capital gains on the gains at a typically 10-15% rate. If you donate it, the charity pays capital gains at their 0% rate. That is better for everyone.
There are charities called Donor Advised Funds who specialize in accepting donations of non-cash assets, converting them into cash, and re-donating the proceeds to other charities at a time of your choosing. Fidelity Charitable probably has the lowest cost of entry for securities, and then it becomes a lifetime relationship. Their initial donation must be $5000 of value. After that, any amount suffices. They don't charge anything else, except for 0.6% a year (less than 1%) for money you keep in the fund.
It's worth selling the item then donating if the item has lost value, and/or if you would be much better at selling it than a charity would. Honestly, charities are short staffed, and if someone gives one a box of Magic: The Gathering cards, they're gonna be "I don't know what to do with this" and may just toss it. A lot of donated items get ... not well used.
Another option (especially if it has appreciated) is to donate it to the charity, get this documented, and then volunteer your labor to help them sell it efficiently.