Remove unnecessary if-else statement.
Closes #1218
Merge branch '4.0' into 4.1
Merge branch '4.1'
Merge pull request #1211 from yvoyer/cleanup-unnecessary-if-else

Code cleanup: Remove unnecessary if-else statement.