It took me a while to figure this out, but it should be equal(error, null) since error is set to null at the start of the HTML function (approximately line 1704).