check if something is not none in python