In general, R works better with NA values instead of NULL values. If by NULL values you mean the value actually says "NULL", as opposed to a blank value, then you can use this to replace NULL factor values with NA:
df <- data.frame(Var1=c('value1','value2','NULL','value4','NULL'),
Var2=c('value1','value2','value3','NULL','value5'))
#Before
Var1 Var2
1 value1 value1
2 value2 value2
3 NULL value3
4 value4 NULL
5 NULL value5
df <- apply(df,2,function(x) suppressWarnings(levels(x)<-sub("NULL", NA, x)))
#After
Var1 Var2
[1,] "value1" "value1"
[2,] "value2" "value2"
[3,] NA "value3"
[4,] "value4" NA
[5,] NA "value5"
It really depends on what the content of your column looks like though. The above only really makes sense to do in the case of columns that aren't numeric. If the values in a column are numeric, then using as.numeric() will automatically remove everything that isn't a digit. Note that it's important to convert factors to character before converting to numeric though; so use as.numeric(as.character(x)), as shown below:
df <- data.frame(Var1=c('1','2','NULL','4','NULL'))
df$Var1 <- as.numeric(as.character(df$Var1))
#After
Var1
1 1
2 2
3 NA
4 4
5 NA