check if string is not none in python