Improved checks on number of arguments in df functions