Added validations

Unused block argument - `key`. If it's necessary, use `_` or `_key` as an argument name to indicate that it won't be used.