added some defensive checks  for the mapper (nypl)