python check if string is not none or empty