If `keys` parameter is array, checked if all elements are strings. Extended test coverage.