There is no command to get the visibility of an object. You can keep track of it manually by setting a variable everytime you change the visiblity of an object.
Code:
object.visible(0)
object.isVisible = 0
.
.
.
if object.isVisible:
print 'object is visible'