Function hasKeys