delete comment.
throw error when obj is null or undefined.