Removing custom errors and using the built in ValueError exception instead.