Graduate degrees pay off for doctors, pharmacists and lawyers, but others may want to think twice.