Returns null if it was created, the value otherwise.
557516
public Object getStateOrCreate(long txid, StateInitializer init) {
        if(_curr.containsKey(txid)) {
            return _curr.get(txid);
        } else {
            getState(txid, init);
            return null;
        }
    }
617515
public static void checkNotEmpty(@Nullable String value, @NonNull String message) {
        if (value == null) {
            throw new NullPointerException(message);
        } else if (value.length() == 0) {
            throw new IllegalStateException(message);
        }
    }
1015072
public function getCreatedAt()
    {
        $metadata = $this->getMetadata();

        try {
            return isset($metadata['created']) ? Carbon::createFromTimestamp($metadata['created']) : null;
        } catch (Exception $e) {
            return;
        }
    }
1266045
@Override
  public Selection<E> value() {
    return value == null ? null : new Selection<E>() {
      @Override
      public E result() {
        return value;
      }

      @Override
      public Object target() {
        return target;
      }
    };
  }
278379
@Override
	public synchronized T get() {
		@Nullable T checkedObject = this.object;

		if (checkedObject == null) {
			this.object = checkedObject = Objects.requireNonNull(this.initializer.get());
		}
		return checkedObject;
	}
96422
function get_or_create() {
                if (locked) {
                    setTimeout(wait, 100);
                } else {
                    locked = true;

                    if (phantom_instance != null) {
                        locked = false;
                        resolve(phantom_instance);
                    } else {
                        phantom.create().then((instance) => {
                            phantom_instance = instance;
                            locked = false;
                            resolve(instance);
                        });
                    }
                }
            }
454700
def created_on(self):
    """"""
    timestamp = self._info.get('creationTime')
    return _parser.Parser.parse_timestamp(timestamp)
1222400
public T fetchSingleOrNull() throws InstantiationException, IllegalAccessException, SQLException {
        if (!finished) {
            T result = primitive ? fetchSinglePrimitiveInternal() : fetchSingleInternal();
            next();
            return result;
        } else {
            return null;
        }
    }
1175925
private static UInteger getCached(long value) {
        if (VALUES != null && value < VALUES.length)
            return VALUES[(int) value];

        return null;
    }
831468
@Nullable
    public V get() {
        if (!valueRetrieved) {
            cacheValue = databaseReader.get();
            valueRetrieved = true;
        }
        return cacheValue;
    }
265437
private String ifNull(){

        if(params.length != 2){
            throw new IllegalArgumentException("Wrong number of Parameters for if null expression");
        }

        final String field1 = record.getValueByFieldName(params[0]);
        if (!field1.isEmpty()){
            return field1;
        }
        final String field2 = record.getValueByFieldName(params[1]);
        return field2;
    }
720160
function (arr, pred) {
    for (var i = 0; i < arr.length; i++) {
      var value = arr[i];
      if (pred(value, i, arr)) {
        return value;
      }
    }
    return null;
  }
919327
public JsonWriter nullValue() throws IOException {
    if (deferredName != null) {
      if (serializeNulls) {
        writeDeferredName();
      } else {
        deferredName = null;
        return this; // skip the name and the value
      }
    }
    beforeValue();
    out.write("null");
    return this;
  }
1217080
public String getSelectedValue() {
        List<WebElement> options = getElement().findElements(By.tagName("option"));
        for (WebElement option : options) {
            if (option.isSelected()) {
                return option.getAttribute("value");
            }
        }
        return null;
    }
119014
public T find(V value) {
		checkInit();

		for (T obj : preDefined) {
			if (matches(obj, value)) {
				return obj;
			}
		}
		return null;
	}
318331
@Nullable
	@Override
	public Double getMinAsDouble() {

		if (min instanceof Number) {
			return ((Number) min).doubleValue();
		}
		return null;
	}
697788
public String getValue(String name) {
		String result = null;
		for (InitParam initParam : initParams) {
			if (initParam.getName().equals(name)) {
				result = initParam.getValue();
				break;
			}
		}
		return result;
	}