Ultrasonic inspection of lithium-ion batteries to determine battery safety