add simple decorator for checking function types