First of all, those two things are not mutually exclusive. There are plenty of pop historians that do good, factual work.
If I'm interested in a book from an author I'm unfamiliar with, the first thing I do is read their bio on the back flap. What are their credentials? Do they have advanced degrees? Did they study\teach in the subject of the book? Do they teach at a university\college or an institute? Institutes of course aren't inherently bad, but anyone can set up an institute in their basement.
Next thing is flip through the back to check out the bibliography and works cited. Are they using reliable sources?
Finally, check the pub. If it's a university press, it's more than likely an academic publication. If it's not a UP, check to see what other books were published by them. This can tell you if it's self published (the titles on their roster will be all over the place), if they have a specialization, and just give you a better feel for what you're looking at.
None of these are automatic qualifiers or discounters, but they'll usually steer you in the right direction.