validating nested objects