Replaced usage of exception in non-exceptional circumstance with monadic binding