delete undefined from key