Again, although it doesn't make sense to use explicit casting with null to assign it to a var type, it is a valid code, shown as follows:
var name = (String)null; // Code compiles
Though the preceding line of code is correct syntax-wise, it is a bad coding practice. Avoid it!