add error detection for anonymous functions (because wasabi depends on fn.name being defined)