throw error on truthy primitive data instead of replacing it with an empty object