coverity#705438, obey preconditions of OUString functions

Change-Id: Ifd8d9a258ca69fbcdafbbb7b8eedd1905e3473bd