A castable expression checks whether a JSONiq value can be cast to a given atomic type and returns true or false accordingly. It can be used before actually casting to that type.
The question mark allows for an empty sequence.
Example 11.4. Castable as expression.
"1" castable as integer,
"foo" castable as integer,
"2013-04-02" castable as date,
() castable as date,
("2013-04-02", "2013-04-03") castable as date,
() castable as date?