throw TypeError if fn.toString match returns null