Changed name variable in function __is_valid_amount to amount.
Added sign checking to function __is_valid_amount