Guard the parameter to be a string in slug method