Please remove this check. `amount` is already checked on the first line of the function, and I don't think it makes sense to report this as error.