Added isFunction method.