also allow boolean as valid doc detection