add comment explaining the type-check in call_function