Write a function to validate an ISBN check digit and explain your approach to error handling and edge cases.