only do Object.keys if data exists