Encapsulates if() statement

Profakos pointed this out