typing: error on foo() when foo is a variable