A few points: 

1) If you are going to give a function a name, then just use a real def statement.
2) I don't see the need to type-check value, since it is only used for strings.  I suppose you are accounting for None.  If so, check explicitly for None.