delete NULL is allowed

Also NULLify the prev pointer after deletion