How to Avoid Legal Risks of AI in HR