i would put all the checks and exception handling in `check_dir` (including returning `None` when its argument is `None`, and write these 5 lines simply as `self.storage = check_dir(storage)`