Add string coercion to avoid crashes