python check if not none and not empty string