type checking functions documented