To quickly wrap a code block in useful constructs, select it in the editor, press &shortcut:SurroundWith; (Code | Surround With) and choose the desired code block, e.g. if.
The list of available options ("wrappers") is context-sensitive and depends on the selected code.
