fix for checking choice array correctly.
update tests and add new tests for limiting attribute types