remove unnecessary null pointer checks(for delete operator)

Maybe we should remove unnecessary null pointer checks for C free
function.