catch for escaping undefined strings