Fix possible ArgumentNullException in diff command