need to look for the key 'haldoc' and not the variable value when checking to strip the haldoc kwargs out before passing kwargs upstrea