Set this value outside the if, then check if it's null.