def validate_arg(arg, parent, key, arg_type)
      result = case arg
        when Array
          validate_array_arg(arg, parent, key, arg_type)
        when Hash
          validate_hash_arg(arg, parent, key, arg_type)
        when Time
          arg = validate_time_arg(arg, parent, key)
          validate_hash_arg(arg, parent, key, arg_type)
        else
          arg
      end
      return result
    end
def validate_arg(arg, parent, key, arg_type)
      result = case arg
        when Array
          validate_array_arg(arg, parent, key, arg_type)
        when Hash
          validate_hash_arg(arg, parent, key, arg_type)
        when Time
          arg = validate_time_arg(arg, parent, key)
          validate_hash_arg(arg, parent, key, arg_type)
        else
          arg
      end
      return result
    end
Validates single argument.