do not create attr if ther eis no ned for it

mongo would save 'null' value when attr is defined but with value 'undefined'. Thank you javascript !!