Machine Learning with sometimes missing data
There are couple of ways to deal with missing data.


Replace missing values by mean/median. If the missing values is very
less, then this method would be apt. Also depends on how skewed
your data is. 
Imputation. Build a linear regression model to predict
the missing values based on other parameters. KNN could also be used
to predict the missing value


Also there are other methods to deal with missing data such as mimicking the parameters, removing missing data, etc.