small update for best practices

- added sanitization of search_id argument for has()
- locally scoped the id var in the get_id() method