Improved error message for incorrect argument type