Replace $.isFunction with typeof check.