Obviously there is no way to completely check "if [your] cable modem is secure and safe?", because you most cannot look into the firmware and internals of the IC (integrated circuit, aka microchips), hence have no way of making sure agains hardware-based backdoors.
That being said, there are still actions you might be able to take to reduce the uncertainty about the "safety" of your device. It would for instance be possible to log the a certain amount of traffic transported/conveyed by your device and search that traffic for manipulations. Clearly this would most likely involve other devices, you already trust, being capable of such a logging activity.
Provided the comment by dandavis, the principle procedure laid out in the preceeding paragraph seems (for a lack of available testing/logging device on the out-bout side ot the cable Modem) unpractical. Therefore, and with respect to the previously stated likewise impracticality to look directly into the Modems circuitry itself, one can say that *for all practical purposes it is at best very hard, *and mostly impossible to "check if [a] cable modem is secure and safe".
"safe"/"secure" are attributes, which of course comprise more than merely not malicously manipulating traffic, as for instance you would like to have the modem not disturbing the other parts of the system linked/attached to that hardware device, something I can sadly not advice you much to.
Besides there will be imho always a struggle with being certain that the device is "safe/secure", as for instance this is not a permanent attribute, but will change over time, I would recommend to tackle the problem by not assuming too much safety/security of that modem, and instead make sure that any harm it may cause is safeguarded against. i.e. use cryptography (tls/ssl, etc.) to protect any data being "touched" by that device.