Allows to store a new element inside the list, using the provided data.
The function will fail to perform any action if a null reference is provided to the function.