Validate array, number, add validation for assoc
Refactoring