Adds check for required number of arguments