Perhaps invert this condition, so you throw earlier and avoid the else clause.