Add a checkForBadReadings subroutine

added a subroutine that checks for any reason a reading-definition pair
cannot be processed. This is reiterating the same functionality it
already had; it's now encapsulated in a method.