check if value is not none in python