e.g. string|null, ObjectNull|null
165415
public function isNullableType(Node $node): bool
    {
        $nodeType = $this->getNodeStaticType($node);
        if (! $nodeType instanceof UnionType) {
            return false;
        }

        return $nodeType->isSuperTypeOf(new NullType())->yes();
    }
68647
def nullify(v):
    

    if isinstance(v, six.string_types):
        v = v.strip()

    if v is None or v == '':
        return None
    else:
        return v
79056
public void encodeNullToNull(Writer writer, T obj) throws IOException {
		if (obj == null) {
			writer.write("null");
			return;
		}

		JsonUtil.startHash(writer);

		encodeValue(writer, obj);

		JsonUtil.endHash(writer);

		writer.flush();
	}
1364933
def stripnull(string):
    """"""
    i = string.find(b'\x00')
    return string if (i < 0) else string[:i]
907578
public static void validateNotNull( Object object, String identifier )
        throws PostConditionException
    {
        if( object == null )
        {
            throw new PostConditionException( identifier + " was NULL." );
        }
    }
778323
public static void checkNotNull(Object o, String msg, int arg1) {
        if (o == null) {
            throwNullPointerEx(msg, arg1);
        }
    }
667877
def p_ConstValue_null(p):
  """"""
  p[0] = model.Value(type=model.Value.NULL, value=p[1])
367327
public static Object requireNonNull(Object object, String errorMessage) {
        if (null == object) {
            throw new NullPointerException(errorMessage);
        }
        return object;
    }
517518
@Nullable
    public static String trimToNull(@Nullable String string) {
        return Optional.ofNullable(string)
                .map(String::trim)
                .filter(StringUtils::isNotEmpty)
                .orElse(null);
    }
906062
def _assign_to_null(obj, path, value, force=True):
    
    try:
        if obj is Null:
            return
        if _get(obj, CLASS) is NullType:
            d = _get(obj, "__dict__")
            o = d[OBJ]
            p = d["__key__"]
            s = [p]+path
            return _assign_to_null(o, s, value)

        path0 = path[0]

        if len(path) == 1:
            if force:
                obj[path0] = value
            else:
                _setdefault(obj, path0, value)
            return

        old_value = obj.get(path0)
        if old_value == None:
            if value == None:
                return
            else:
                obj[path0] = old_value = {}

        _assign_to_null(old_value, path[1:], value)
    except Exception as e:
        raise e
1110208
private void checkForNull(String name, Object value) {
        if(name == null) {
            throw new NullPointerException("name must not be null");
        }
        if(value == null) {
            throw new NullPointerException("value must not be null");
        }
    }
551787
def p_null_literal(self, p):
        """"""
        p[0] = self.asttypes.Null(p[1])
        p[0].setpos(p)
885047
protected String nullIfEmpty(String str) {
        return (str == null || str.trim().length() == 0) ? null : str;
    }
672440
function( input, null_text ) {
		if ( input == null || input === undefined ) return null_text || '';
		if ( typeof input === 'object' && Object.prototype.toString.call(input) === '[object Date]' ) return input.toDateString();
		if ( input.toString ) return input.toString().replace(/\n/g, '<br />').replace(/''/g, "'");
		return '';
	}
879970
public static <T> T notNull(T object, String description) {
        if (object == null) {
            throw new NullPointerException(description);
        }
        return object;
    }
562939
public static void assertNull(Object object, String message) {
		if (imp != null && object != null) {
			imp.assertFailed(message);
		}
	}
530912
function _blank(obj) {
        var cache;

        if((cache = typeof obj) !== 'boolean' && (cache !== 'number' || isNaN(obj)) && !obj) return true;
        if(cache == 'string' && obj.replace(/\s/g, '').length === 0) return true;
        if(cache == 'object') {
          if((cache = toString.call(obj)) == '[object Array]' && obj.length === 0) return true;
          if(cache == '[object Object]') {
            for(cache in obj) {
              return false;
            }
            return true;
          }
        }
        return false;
      }