bettery type checking