Better way to check for value = None