check if string is not null in python