checkalive.py: more checks before accessing stuff