slug could be set to an empty string, so check this
Merge pull request #358 from humanmade/get-slug-condition

slug could be set to an empty string, so check this