Refactor if-else for omited curly braces.