Could be combined with an ```and``` rather than a nested if.