Explanation

In the second form of if statement (the one including else), if Template:sparam is also an if statement then that inner if statement must contain an else part as well (in other words, in nested if-statements, the else is associated with the closest if that doesn't have an else)