prevent insert nil into dic