Regarding dynamic data members

in the following code used in video by prateek bhaiya:

~car(){
if(name!=NULL){
delete [] name;}

what is the use of if condition. can’t we directly write delete for dynamic members?