checkLogical function

Check if given object is a boolean.