Check if a battery is connected.