Is it possible to edit all texts without affecting other curves using Python? I have run into an issue where I need to edit all text curves to change their content, but I also need to be able to use other curves that are not text within the scene.  

If I try and use the standard for x in y method and cycle through all curves I get the error I expected.

import bpy

curves = bpy.data.curves

for c in curves:
  print(c.data.body)
  c.data.body = 'this has worked'


'Curve' object has no attribute 'data'

This is caused by non-text curve objects in the scene, which of course have no text attributes. What are my options to work around this limitation of having text objects bundled in with all curve objects?

Adding text object definitions manually is not an option as this needs to be extremely flexible.
Edited, thanks.

import bpy

curves = bpy.data.curves

for c in curves:
    if isinstance (c, bpy.types.TextCurve):
        print(c.body)
        c.body = 'this works in better style'