Added check for null delete