Apply suggestions from code review
Apply suggestions from code review

Use more specific exception classes.

Co-Authored-By: Chris Markiewicz <bce6110fcc688919682a3f2f54141e09a0d7906c@stanford.edu>
INCF/pybids