fix uncaught error when calling `wraptext` on undefined text