Add type check before generating url

fixes madglory/backbone-fetch-cache#89