catch a type error in function.py. properly fixes #1226 (#1247)
catch a type error in function.py. properly fixes #1226 (#1247)

Commit 9481da5 trying to fix the issue was broken due to change the
variable type at a wrong place.
iamahuman/angr,schieb/angr,angr/angr,angr/angr,angr/angr,iamahuman/angr,schieb/angr,schieb/angr,iamahuman/angr