So, first we will check that the node is pointing to a normal node, if it is pointing to a null node that is nothing to be the done. So, there is nothing to be appended. So, you have return. Now, if there is a list, then what to you do is if there is no need list what you do is you make an list with only one node which is p.
जर तुम्हाला ऍड करायचा नोड p हा null असेल तर काहीच होणार नाही म्हणजे अपेन्ड ओपरेशन होणार नाही याचअर्थ null रिटर्न होईल.