src/precore/util/Optional.php
public static function ofNullable($nullableReference) : Optional
    {
        return $nullableReference === null
            ? Optional::absent()
            : Optional::of($nullableReference);
    }
public static function ofNullable($nullableReference) : Optional
    {
        return $nullableReference === null
            ? Optional::absent()
            : Optional::of($nullableReference);
    }
public static function ofNullable ( $ nullableReference ) : Optional { return $ nullableReference === null ? Optional :: absent ( ) : Optional :: of ( $ nullableReference ) ; }
If nullableReference is non-null, returns an {@link Optional} instance containing that
reference; otherwise returns {@link Optional::absent}.

@param $nullableReference
@return Optional
If nullableReference is non - null returns an { @link Optional } instance containing that reference ; otherwise returns { @link Optional :: absent } .