python check if not none or empty