Battery and check engine light.

I have a 2014 Sportsman 800. Last week at the farm it kept flashing me a battery and check engine light intermittently. The bike has always been kept on a battery tender since it was new. It isn’t giving me any other problems besides the light. Is this the bike’s way of telling me it’s time to replace the battery? Or is it possible something else could be causing this. It’s not giving me any other signs of a bad battery and don’t want to fork over cash for a battery if this could possibly be something else. Thanks in advance for any help!