toolkit: use String.length()==0 instead of String.equals(empty string)

Change-Id: Id38f28e7138460493fde982cc1ebc75c3cb0b386
Reviewed-on: https://gerrit.libreoffice.org/11365
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>