static checks now receives the function object (WIP type checking)