Fixes to avoid null pointer errors
Better handling of PubMed IDs