weakref: DRY up the "Weakref instance expected" code
weakref: DRY up the "Weakref instance expected" code

With a macro

fastest963/node-weak,KenanSulayman/node-weak,EvolveLabs/electron-weak,TooTallNate/node-weak,kkoopa/node-weak,fastest963/node-weak,KenanSulayman/node-weak,KenanSulayman/node-weak,EvolveLabs/electron-weak,robcolburn/node-weak,unbornchikken/node-weak,robcolburn/node-weak,unbornchikken/node-weak,TooTallNate/node-weak,EvolveLabs/electron-weak,kkoopa/node-weak,unbornchikken/node-weak,fastest963/node-weak,robcolburn/node-weak,kkoopa/node-weak,TooTallNate/node-weak