samples: synchronisation: handle empty thread name

In some cases we were returning empty thread names, so make sure we
check for the thread names correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
1 file changed