Asure that Thread.curren[:tenant_id] is a integer or nil