Simplify if-statement

Change-Id: Icc91ed0650297935538a6398f4a540899b677317