check the existence of attributes before insertion