Use brackets for if statement to avoid SyntaxError

Fixes SyntaxError