In some diseases, it is possible. For example, in breast cancer screening and diagnostics, geneticists are able to isolate a genomic copy BRCA1 and BRCA2 genes from the host DNA via TAR (transformation-assisted recombination). The same goes in detection of Huntington's disease and retinoblastoma.
However, in cases of male alopecia, I firmly believe that there isn't a specific test yet to isolate the baldness gene from your DNA and prove that you do not carry it. (anyone may correct me if I'm wrong, though) However, some studies show that if your maternal grandfather manifested with pattern baldness during his years, it poses a high risk that you also carry the gene. It's a genetic thing. For now, unfortunately, waiting is the only way to find out if you really possess the gene.