Fix syntax error by adding alternative to if