</code> object can be used to type-check common Logtalk
and Prolog term types (see the object documentation for a listing of all
the pre-defined types). The <code class="docutils literal notranslate"><span class="pre">valid/2</span></code> predicate succeeds or fails if a
term is of a given type. For example:</p>
<div class="highlight-logtalk notranslate"><div class="highlight"><pre><span></span>| <span class="o">?-</span> type<span class="o">::</span>valid(positive_integer, <span class="m">42</span>).
yes
