Working on the type checking of local functions