Is this a boolean value?

boolp expression
bool? expression

Returns true if expression outputs boolean value.

Example:

print bool? 2 > 3
print bool? "true
print bool? "abc

Output:

True
True
False

See also:

Type predicates

Table of Content