Selenium Java - Handling Form Elements
Identify the error in the following Selenium Java code for checking a checkbox:
WebElement checkbox = driver.findElement(By.id("terms"));
if (checkbox.isSelected() = false) {
checkbox.click();
}