use our internal isFunction check