Error handling for batteries that return strings