python check if string not none or empty