python check if variable not none