This function checks the behavior invoke would have with the provided parameters. Refer to invoke's documentation for more details.