Remove unnecessary else clause.
Extract precondition assertion for readability.