Added checking of function argument types in functions with multiple arguments