check for null before setting soemthing into model