Fix for bug #22069 by only deleting helix and sheet data with structure.delete when it exists.
This is bug #22069 (https://gna.org/bugs/index.php?22069), the failure of the structure.delete user
function with "AttributeError: Internal instance has no attribute 'helices'".