Widgets

The positive check (`typeof(max) == 'function'`) would be clearer, safer, and more flexible.