Fixes #374 (using regex for PMID instead of substring)

Side note: I also added checking for null/undefined to a function in web app because this was causing problems with loading genotype pages.