Make this logic less confusing
style
Raise a useful message
Don't use exceptions for flow-control