Take a story's temperature by studying its tone. Is it hopeful? Cynical? Snarky? Playful?
Heavier than you'd expect from a comedy…
Shakespeare is supposedly writing about comedic characters in a comedic situation (see our discussion on "Genre" for more on this), but the plot of the play, and its constant closeness to danger, force the reader to recognize that much more is going on than what's on the surface. Characters are always hinting at their own complexity: Portia is obedient but devious, Antonio is self-sacrificing but self-pitying, and Shylock is cruel but also a victim of great cruelty.
The real focus of the play is prejudice and oppression of minorities, whether by gender, sexual orientation, or class. Shakespeare chooses not to deal with these hot-button issues in a heavy-handed way, so he errs on the side of laughing at life's absurdities.