python check if string is not empty and not none