check if variable is not none in python