Fixed TypeError when updating slug

- added check slug before trim