These nested `if` blocks can be aggregated