could use _.isFunction here instead