Check for SyntaxError before transforming int