added extra checks in data formater