Added null check and ArgumentNullException is thrown now.