Type checking function parameters with function calling