fixes for input validation for Arrays and Hashes