···7171 raise ArgumentError.new("You can only use `find_by` on unique indexes.")
7272 end
73737474- unless (type = @indexes_definitions.fetch(key)[0]) === value
7575- raise Literal::TypeError.expected(value, to_be_a: type)
7676- end
7474+ type = @indexes_definitions.fetch(key)[0]
7575+ Literal.check(actual: value, expected: type)
77767877 @indexes.fetch(key)[value]&.first
7978 end