Removed unecessary 'is not None' checks.