magit-guess-branch: fix recently introduced bug

nil is a list and it's car is also nil, but nil isn't a string.
Therefor first test whether the list is empty.