I thought IsNullOrWhiteSpace is safer, but its performance is slower, so I change them back to IsNullOrEmpty.