Added isset if for mistake type