lib: Update error check for new string conversion wrapper