Fix device sorting when name is null.

Closes #68.
Merge pull request #69 from square/jw/fix-npe

Fix device sorting when name is null.