python API - how to know if connection is OK?

Hello ,
when I connect to my router I use

import routeros_api
connection = routeros_api.RouterOsApiPool(Router_IP, username='admin', password='mypass')

how can I tell if the connection OK , or if there ware probkem in the user\pass\address
when I print the connection I get this :

<routeros_api.api.RouterOsApiPool object at 0xb5ead070>

for example -
I want to know if the password is wrong -and then pring “Wrong pass”
or if hte router is not online \ can’t connect to it

Also so I have try to use this to know if I manage to connect to the router :

print (connection.connected)

but it return me “False” all the time , when I’m connected to the router and when I’m not

can someone guide ?

Thanks ,