Changed some null or whitespace check exceptions to ArgumentException instead of ArgumentNullException