types checking for arguments of function definition and function call