Following your dream or to investigate the job market when choosing a profession

Is it better to follow your dream or to investigate the job market when choosing a profession?