Added an onChange function to AnyVar